conditional formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to create a formula that does the following...

if b1 is D, then multiply b4 x 1
if b1 is C, then multiply b4 x 2
if b1 is B, then multiple b4 x 3
if b1 is A, then multiply b4 X 4

Can anyone help me creat this formula??

Thanks,
Michelle
 
What does your question have to do with the subject line: conditional
formatting?

Try this:

=IF(OR(B1={"A","B","C","D"}),B4*MATCH(B1,{"D","C","B","A"},0),"")

Biff
Microsoft Excel MVP
 
Conditional formatting does not change the underlying value. If you want the
result in some other cell than those you listed, you could use a nested IF,
like
=IF(B1="D",B4*1,IF(B1="C",B4*2,IF(B1="B",B4*3,IF(B1="A",B4*4))))
For a larger list, you might prefer to use a VLOOKUP() table.

Note that you have not specified an action if none of the conditions are true.

Jerry
 
T. Valko, that was genius!

T. Valko said:
What does your question have to do with the subject line: conditional
formatting?

Try this:

=IF(OR(B1={"A","B","C","D"}),B4*MATCH(B1,{"D","C","B","A"},0),"")

Biff
Microsoft Excel MVP
 
I appologize for my misuse of terminology. I'm obviously not an excell
expert....

Your help is appreciated.
 
Thanks for everyone's help! I really appreciate it!

Michelle

and to the poster (Jerry) that asked about when none of the conditions are
true..in this case it woulsd always be a, b, c or d.

Thanks again!
 
to compensate for higher than D
=LOOKUP(B5,{"a","b","c","d","e"},{4,3,2,1,0})*B4
 
Back
Top