replacement for IF function?

F

fastballfreddy

I have 22 options. Instead of using the IF function what can I use or
can I use the IF function w/ another function? This is what I have.

Cells A1, A2, A3 and so on

This is what I started w/ the IF function:

=IF(A1=0,22,IF(A2=0,21,IF(A3=0,20 and so on

Thanks,
 
F

fastballfreddy

A1, A2, A3 and so on is the total money from other cells, so if A1 =
then I want the cell to show 22, which is for the # of days left in th
month, if there is a value other then 0, go on to A2 and if A2=0 show 2
and so on.

Basically if
A1 = 0 (result 22) - if not then test A2
A2 = 0 (result 21) - if not then test A3
A3 = 0 (result 20) and so, testing each one until it finds the cel
that equals
 
D

Dana DeLouis

Hi. Given your example, if Rng refers to A1:A23, then perhaps this array
formula:

=23-MIN(IF(Rng=0,ROW(Rng)))

--
HTH. :>)
Dana DeLouis
Windows XP, Office 2003


"fastballfreddy"
 
F

fastballfreddy

I just wanted to thank everybody for their replies. I ended up usin
the vlookup
 
Top