Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
littlebit
 
Posts: n/a
Default more ifs and an or thrown in for good measure

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.
  #2   Report Post  
Anne Troy
 
Posts: n/a
Default

=if(or(a1="a",a1="b"),5,if(a1="c",10,if(a1="m",15, "error code")))

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"littlebit" wrote in message
...
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.



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(OR(A2="a",A2="b"),5,IF(A2="c",10,IF(A2="m",15, NA())))

--
HTH

Bob Phillips

"littlebit" wrote in message
...
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.



  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=IF(OR(A1="a",A1="b"),5,IF(A1="c",10,IF(A1="m",15, "Error")))


In article ,
littlebit wrote:

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.

  #5   Report Post  
PeterAtherton
 
Posts: n/a
Default



"littlebit" wrote:

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


  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

And one mo

=IF(OR(A1={"a","b"}),5,IF(A1="c",10,IF(A1="m",15," error")))



littlebit wrote:

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.


--

Dave Peterson
  #7   Report Post  
RagDyer
 
Posts: n/a
Default

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!
==============================================



"littlebit" wrote in message
...
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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"