Excel IF AND, OR phrasing

John Darby
John Darby used Ask the Experts™
on
I had this question after viewing Excel IF statement.

I have 3 possible values now,
"5+ times"
"2-4 times"
"0-1 times"

How do I alter this statement: =IF(E25="YES",1,0) to allow for this logic?
"5+ times" = 1
"2-4 times" = 2
"0-1 times" = 3

Thank you!
JohnD
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Architect
Commented:
Hi,

you can use this:

=IF(E25="5+ times",1,IF(E25="2-4 times",2,3))    

Open in new window


or

=IF(E25="5+ times",1,IF(E25="2-4 times",2,IF(E25="0-1 times",3,0)))    

Open in new window

Author

Commented:
Works like a charm; thank you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial