Search code examples
google-sheetsgoogle-sheets-formula

Google Sheets - Find the first negative value in a row and return its row header


my Google Sheets file and the error I'm getting

The expected answer in this case is March 2010

I've tried using the formula available on other questions but it didn't work for me (maybe the formula works for columns but not rows)- need an expert's advice :)

Thanks!


Solution

  • One of the main differences of Excel and GoogleSheet that the latter not use implicit array functions. You need to declare explicitly always.

    Based on this the formula:

    =INDEX(A1:F1,,ARRAYFORMULA(MATCH(true,A2:F2<0,0)))