0

enter image description here

I'm trying to find a formula that given a row (1 and 5 in these examples), it will return the coordinates of first non-empty cell in that row. In these examples, the answers should be G1 and J5.

I've tried to use the answer to this question, but I haven't been able to get it to work.

nachocab
  • 13,328
  • 21
  • 91
  • 149
  • this seems like it could be an xy-problem. Would you mind explaining the use case a little? http://xyproblem.info/ – MattKing Mar 22 '20 at 20:25

1 Answers1

2

This gives the cell after the last non-empty cell in the row which I think is what you want.

Should be just a case of using columns instead of rows:

=ArrayFormula(address(row()-1,FILTER(column(1:1), COLUMN(1:1)=MAX(FILTER(COLUMN(1:1), NOT(ISBLANK(1:1)))))+1,4))

enter image description here

Tom Sharpe
  • 30,727
  • 5
  • 24
  • 37
  • what do you mean by "using columns instead of rows"? – nachocab Mar 22 '20 at 15:37
  • 1
    I mean it's basically the same as https://stackoverflow.com/questions/32890557/how-to-find-nearest-non-blank-cell-above-the-current-cell (the question you were referring to) but with a horizontal range instead of vertical. – Tom Sharpe Mar 22 '20 at 15:42