What would be the Google Sheets formula to search for a matching value in a range that goes across multiple rows an columns? For example I need to search the entire range H:P (all rows and columns) and find the cells with a matching value, if any. Ultimately in this case I need just a list of the row numbers where a matching cell is found. In the screenshot there are two matches highlighted in green. There is a match on O2, and on M3. So in this case I need a result like "2,3".
I have tried various things for several hours with no luck. Most examples of formulas that I could find and understand are about looking up in either a single column, or row.
Any help appreciated! Thank you!
Best Answer
Use this formula in cell D16 and copy down to cells D17 and D18.
It is not clear from the question whether the formula is to be used in a single cell, or in several cells (as in the example).
The queried ranges are open-ended (e.g.
InStock!$C$2:$C,InStock!$B$2:$B;
) - this allows additional data rows to be added to sheet="InStock" and that data will be included in the query.Example Output