How do I choose first value greater than 0?

J

jagruc

I have a worksheet with data by month in columns. I want to look
through the data consecutively and find the first value greater than 0
in each row.

I can do this with an imbedded if statement, but I did not know until
recently that you can only have 8 IF's. So it takes two if formulas,
the first with 8 IFs the second with five, one to compare to the result
of the first IF formula and the rest to check the final 4 months of
data.

I tried to figure out a way to use the CHOOSE option to make this work
but had no success there.

Is there a better way to do this?
 
B

Biff

Hi!

Try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=INDEX(B1:M1,MATCH(TRUE,B1:M1>0,0))

Biff
 
Top