IF Function Question - how many IF's can I have in one formula??

F

Frustrated

I am trying to do an =if function which is dependent on what month of the
year it is so I need 12 (one for each month)

Excel will only let me have 7. The Excel help states: Up to seven IF
functions can be nested as value????

Anyone know how I can get around this problem and have 12. Would very much
appreciate it.

This is the formula Excel will let me have but if I try to put in
one/several more IF it comes up as an error:
=IF(A2=1,'PL 2005 '!I5,IF(A2=2,'PL 2005 '!J5,IF(A2=3,'PL 2005
'!K5,IF(A2=4,'PL 2005 '!L5,IF(A2=5,'PL 2005 '!M5,IF(A2=6,'PL 2005
'!N5,IF(A2=7,'PL 2005 '!C5,IF(A2=8,'PL 2005 '!D50,0))))))))

I want
=IF(A2=1,'PL 2005 '!I5,IF(A2=2,'PL 2005 '!J5,IF(A2=3,'PL 2005
'!K5,IF(A2=4,'PL 2005 '!L5,IF(A2=5,'PL 2005 '!M5,IF(A2=6,'PL 2005
'!N5,IF(A2=7,'PL 2005 '!C5,IF(A2=8,'PL 2005 '!D5,IF(A2=9,'PL 2005
'!e5,IF(A2=10,'PL 2005 '!f5,IF(A2=11,'PL 2005 '!g5,IF(A2=12,'PL 2005
'!h5,,0))))))))))))

Thanks
 
F

Frank Kabel

Hi
don't use IF statements :)

Try the following formula:
=IF(AND(A2>=1,A2<=12),OFFSET('PL 2005 '!I5,0,A2-1),0)
 
A

Aladin Akyurek

=INDEX(CHOOSE(MATCH(A2,{1,7}),'PL 2005 '!I5:N5,'PL 2005
'!C5:H5),IF(A2>6,A2-6,A2))

[...]
 
G

gatwickxx

You can only have 7 IF functions in one formula but you can use tw
formulae over more than one column.

In one column, nest the first 7 if functions giving a result like "XXX
if no condition is met. In the next column to the right use an IF t
say that if the first function result is "XXX" then state the other
tests. In a third column have another IF function to return th
appropriate result from the IF functions in the columns to the left
 

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