Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 446

Adding a filter to query for row# in google sheets

$
0
0
ROWS(B1:XLOOKUP(P22,B:B,B:B)

The above snippet returns the first row# where a value in column B matches P22. How would I add a filter to only return row#'s where J:J="foo"?

filter(ROWS(B1:XLOOKUP(P22,B:B,B:B),J:J="foo")

This doesn't work.

Update:

=XLOOKUP(P22&J22,ARRAYFORMULA(B:B&J:J),B:B)

J22="foo"

This returns the data from the first row in column B where a value matches P22, and the value in column J matches "foo". So we have succeeded in returning the correct row, now I just need it to return the actual row# instead of "foo".

=XLOOKUP(P22&J22,ARRAYFORMULA(B:B&J:J),return row # here)

Viewing all articles
Browse latest Browse all 446

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>