Google Sheet: Reference cell inside importhtml query

354 Views Asked by At

I am trying to using the following formula to import a table from ESPN:

=QUERY(IMPORTHTML("http://games.espn.com/ffl/schedule?leagueId=2127","table",2),"SELECT * WHERE Col1 = "&B3&"")

Basically, I only want to return rows that contain the value inside cell B3. However, I am having trouble getting the formula to work. It works fine when I manually type in the value instead of referencing the cell. How can I reference a cell my query?

1

There are 1 best solutions below

0
On

I was able to solve this by using the below formula instead:

=QUERY(IMPORTHTML("http://games.espn.com/ffl/schedule?leagueId=2127","table",2),"SELECT * WHERE Col1 = '"&$B3&"'")