more ifs and an or thrown in for good measure

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

Guest

I'm tryng to write a statement for the following:
if a or b are typed in cell than 5 is the multiplier, if c is typed in cell
than 10 is multiplier, if m is typed in cell than 15 is multiplier, anything
else would give an error code. help appreciated. using excel 2000.
 
One way:

=IF(OR(A1="a",A1="b"),5,IF(A1="c",10,IF(A1="m",15,"Error")))
 
littlebit said:
I'm tryng to write a statement for the following:
if a or b are typed in cell than 5 is the multiplier, if c is typed in cell
than 10 is multiplier, if m is typed in cell than 15 is multiplier, anything
else would give an error code. help appreciated. using excel 2000.

Try

=IF(OR(A2="a",A2="B"),5,IF(A2="c",10,IF(A2="m",15,"Error Value in A2")))

regards
Peter Atherton
 
And one more:

=IF(OR(A1={"a","b"}),5,IF(A1="c",10,IF(A1="m",15,"error")))
 
Since you asked for an "error code", try this for brevity:

=VLOOKUP(A1,{"a",5;"b",5;"c",10;"m",15},2,0)
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 

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

Back
Top