Too many IF functions

M

Molly

Hey guys,

I have an IF statement that surpasses the amount of allowed IF's (7).
I have looked around and everyone seems to say to do a Vlookup but I
don't think that is what I want. Can you help me out?

This is the code:
========================================================================
=IF(F3="0 to < 4 feet Ditch and No Barrier",4,IF(F4="Concrete Barrier
without to < 2 feet Ditch",3,IF(F5="Guide Rail without to < 4 feet
Ditch",3,IF(F6=">= 4 feet to < 8 feet Ditch",3,IF(F7="Light Duty
Netting",3,IF(F8="Concrete Barrier with >= 2 Ditch",2,IF(F9="Guide
Rail with >= 4 feet Ditch",2,IF(F10="Light Duty Fence",2,IF(F11="Heavy
Duty Fence",1,IF(F12="Heavy Duty Netting",1,""))))))))))
========================================================================

Thanks,
Molly
My website: http://techmolly.com
 
D

Dave Peterson

You're really checking F3, F4, ..., F12 for different strings?

If all of these are mutually exclusive (a maximum of exactly one could happen),
then:


=IF(F3="0 to < 4 feet Ditch and No Barrier",4,0)
+IF(F4="Concrete Barrier without to < 2 feet Ditch",3,0)
+IF(F5="Guide Rail without to < 4 feet Ditch",3,0)
+IF(F6=">= 4 feet to < 8 feet Ditch",3,0)
+IF(F7="Light Duty Netting",3,0)
+IF(F8="Concrete Barrier with >= 2 Ditch",2,0)
+IF(F9="Guide Rail with >= 4 feet Ditch",2,0)
+IF(F10="Light Duty Fence",2,0)
+IF(F11="Heavy Duty Fence",1,IF(F12="Heavy Duty Netting",1,0)

This will actually return a 0 if non of these are true.
 
M

Molly

Hey guys,

I have an IF statement that surpasses the amount of allowed IF's (7).
I have looked around and everyone seems to say to do a Vlookup but I
don't think that is what I want. Can you help me out?

This is the code:
========================================================================
=IF(F3="0 to < 4 feet Ditch and No Barrier",4,IF(F4="Concrete Barrier
without to < 2 feet Ditch",3,IF(F5="Guide Rail without to < 4 feet
Ditch",3,IF(F6=">= 4 feet to < 8 feet Ditch",3,IF(F7="Light Duty
Netting",3,IF(F8="Concrete Barrier with >= 2 Ditch",2,IF(F9="Guide
Rail with >= 4 feet Ditch",2,IF(F10="Light Duty Fence",2,IF(F11="Heavy
Duty Fence",1,IF(F12="Heavy Duty Netting",1,""))))))))))
========================================================================

Thanks,
Molly
My website:http://techmolly.com

Nevermind, I figured it out.

Thanks though :)
Molly
My website: http://techmolly.com
 

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