LeftMost Populated Value

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
 
D

Dave Peterson

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top