LeftMost Populated Value

  • Thread starter Thread starter SanCarlosCyclist
  • Start date Start date
S

SanCarlosCyclist

I would like your help with a formula. In a given row, I want to
populate a specific range with the left most value that is not null.
Below is an example:

Row 1
d e f
g h
null null 33
45 99


In the C column of that row, I want the formula to produce the value
of 33. I want to be able to copy the results down.

Thanks for your help
 
One way:

=INDEX(D1:G1,MATCH(true,d1:h1<>"",0))

If there's a chance that all 5 cells are empty and you don't want the error:

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

=if(counta(d1:h1)=0,"no entries",index(d1:h1,match(true,d1:h1<>"",0)))
(still an array formula)
 
Back
Top