0
votes

I'm importing a table of crypto currency prices from a website, using =IMPORTHTML() function. So I can pull prices from this sheet into other sheets. For example: If I want to display the current price of BTC, I refer to the cell in the sheet that imports prices from the finance website, as "Sheet1!B2" etc...

But the pricing list I'm importing changes constantly, the order of the rows can change day to day. Today's BTC (cell B2) might be tomorrow's ETH.

I want to select the cell I'm looking for precisely in my functions. How can I say "select the price of the row that contains 'BTC' in its first cell"?

2

2 Answers

1
votes

if column A holds BTC and column B holds value use:

=VLOOKUP("BTC", A:B, 2, 0)
0
votes

You can also make use of the following query:

=QUERY(A:B, "SELECT B WHERE A CONTAINS 'BTC' LIMIT 1" )

The above formula makes use of the QUERY function and it uses the Google Visualization API Query Language. The query itself works in the following way: (assuming that the prices are stored in the B column, and BTC can be found in the A column) it selects the first price value from the row who contains the BTC.

Demo

demo ss

Reference