'I need to get the answer that is 1 above my query search

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.



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vector