Google-sheets – Use importhtml to import a single cell vs a whole column

formulasgoogle sheetsgoogle-sheets-queryimporthtml

As the title would read, I am looking for a method to import data from a retail site to my current spreadsheet to have the prices update in real time. Unfortunately I am not educated in this so I am attempting to learn.

In my internet search I was able to come up with this:

=QUERY(IMPORTHTML("https://shop.tcgplayer.com/magic/darksteel/echoing-truth?xid=pid0b5fc15-f2ac-4f33-ae86-a3ed6d38bb44","table",2),"select Col2")

This although is returning 2 cells from the table that I was able to locate but I want to be able to just import a single cell. In this case, just the normal price (first row).

Best Answer

You can wrap your current formula with the INDEX function:

=INDEX(QUERY(IMPORTHTML("https://shop.tcgplayer.com/magic/darksteel/echoing-truth?xid=pid0b5fc15-f2ac-4f33-ae86-a3ed6d38bb44","table",2),"select Col2"),1)

Using =INDEX(...,1) you get the first row, while using =INDEX(...,2) the second.