Home > Blockchain >  I need to get the answer that is 1 above my query search
I need to get the answer that is 1 above my query search

Time:03-24

I have an equation that goes into a column and searches for the first 0, the column tracks the progress of things in 1s and 0s, problem is that setting it to find 1 only returns the top most value, I would either need this to find the and return the top most 0 1 cell above or to search bottom up. I need it to return the string in the corresponding cell.

=QUERY(A3:D,"Select A where D = 0 limit 1",0)

This hasn't worked for me, I have not been able to find a way to either invert the search to bottom up or to simply grab the string in the cell above the first 0 found in the list.

CodePudding user response:

You can try something like this, if you're only trying to get Column A:-

=QUERY(A3:D,"Select A where D = 0 offset "&COUNTA(A3:A) ,0)

Reference:-

Offset

  • Related