Excel formula Help

M

MTHowse

I know this is simple but I do not know how to make it work.
Column A, B and C contain numbers, Column E contains letters A, B, C, D.
What I want to do is if Column E contains A then Column D=C*3 if Column E
contains B then Column D=C*2, etc.
 
J

Jacob Skaria

Try the below formula in D1 and copy down as required

=C1*IF(E1="A",3,IF(E1="B",2))
 
M

MTHowse

Thanks Biff one of these days I hope to become an Excel Guru!
--
Thanks,
Mike


T. Valko said:
If your scale is:

A= 3
B = 2
C = 1
D = 0

=C1*(MATCH(E1,{"D","C","B","A"},0)-1)
 
R

Rick Rothstein

Here is a little bit shorter formula to do the same thing...

=C1*(68-CODE(E1))

--
Rick (MVP - Excel)


T. Valko said:
If your scale is:

A= 3
B = 2
C = 1
D = 0

=C1*(MATCH(E1,{"D","C","B","A"},0)-1)
 
T

Teethless mama

=C1*(68-CODE(E1))

If OP use a lower case letter your formula returns incorrect value.

Try this BULLET proof formula:

=C1*(68-CODE(UPPER(E1)))


Rick Rothstein said:
Here is a little bit shorter formula to do the same thing...

=C1*(68-CODE(E1))
 
T

T. Valko

=C1*(68-CODE(E1))

Just to be on the safe side I'd use this:

=C1*(68-CODE(UPPER(E1)))

--
Biff
Microsoft Excel MVP


Rick Rothstein said:
Here is a little bit shorter formula to do the same thing...

=C1*(68-CODE(E1))
 
R

Rick Rothstein

Would you believe... I was assuming the letters came from a Data Validation
List? Oh, okay, I wouldn't either.<g> Thanks for picking up on that.
 
T

T. Valko

Try this BULLET proof formula:

Not even close to being "bullet proof".

And yes, I know, neither is my suggestion.
 
J

Jacob Skaria

Oops..It should be somthing like the below to assign the weightage..

=C1*(SEARCH(E1,"DCBA")-1)
OR
=C1*(68-CODE(UPPER(E1)))

If this post helps click Yes
 

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