Search code examples
excelif-statementgoogle-sheetslambdatextjoin

Is there a Google Sheets (or Excel) formula like HLOOKUP() but that will search over a two-dimensional range, as opposed to a single row?


I have a Google Sheets spreadsheet and I am hoping to write a formula that finds the location of a given phrase anywhere in the spreadsheet and then returns the value of the cell a certain number of cells below the searched-for cell. For example, if I am searching for the value "11/15/2022", and that cell is C4, I would want to return the value of cell C6. I have tried using HLOOKUP(), but that limits my search range to a single row, and I need to be able to search anywhere in the spreadsheet (and the data has dimensions that are both greater than one).

Is there a function (either Excel or Google Sheets) that will perform this? Any help is much appreciated!


Solution

  • try:

    =INDEX(TEXTJOIN(, 1, IF(B1:F10=A1, B3:F12, )))
    

    enter image description here