Hi,
I am trying to set up an IF function, and it has the following conditions:
If A1=High & B1=Maximum then C1= High
If A1=High & B1=Moderate then C1= High
If A1=High & B1=Lowthen C1= Moderate
If A1=Moderate/low & B1=Low then C1= Low
If A1=Moderate/low & B1=Moderate then C1= Low
If A1=Moderate/low & B1=Maximum then C1= Moderate
Is there any way to put all of that together in a single function?
Please Help!
maybe this formula in C1
Code:=IF(A1="High",IF(OR(B1="Maximum",B1="Moderate"),"High","Moderate"),IF(OR(B1="LOW",B1="Moderate"),"Low","Moderate"))
assuming that A1 will only ever have either of the two values and B1 only ever have one of the three you listed.
Last edited by teylyn; 11-11-2009 at 09:57 PM.
teylyn
Microsoft MVP - Excel
At Excelforum, you can say "Thank you!" by clicking theicon below the post.
Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.
Teylyn, just an FYI: when you use long formulas, this system puts a space after every 100 characters. For that reason, it's often best to use code wrappers for them.
thanks, darkyam. added code tags above.
teylyn
Microsoft MVP - Excel
At Excelforum, you can say "Thank you!" by clicking theicon below the post.
Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.
How about:
=IF(NOT(A1="High"), IF(B1="Maximum","Moderate","Low"), IF(B1="Low", "Moderate", "High"))
(hat-tip to Teylyn)
You should probably have a test to make sure the formula should run at all...something like:
=IF(OR(A1="",B1=""), "", IF(NOT(A1="High"), IF(B1="Maximum","Moderate","Low"), IF(B1="Low", "Moderate", "High")))
Last edited by JBeaucaire; 11-11-2009 at 10:11 PM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks