How do I limit the number of rows this formula looks at?
I only want it to return the lowest number from the first 20 rows. I don't want it to consider the rows below 20.
QUERY(IMPORTHTML("https://fakewebsite.com/", "table", 1), "SELECT Col3, Col2 order by Col2 limit 1")
Use query()
two times, first to get just the first 20 rows, then to get the one row within those 20 rows that has the smallest value in column 2, like this:
=query(
query(
importhtml("https://fakewebsite.com/", "table", 1),
"limit 20",
1
),
"select Col3, Col2 order by Col2 limit 1",
1
)
See query().