#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default "OR" in Formula

I'm trying to create a formula that basically says:
IF a2 = BC or WWW, then insert the number 60, else if a2 = FR or FH, then
insert the number 120, else if a2 = SS or BS or PS or AS, then insert the
number 200.

This has me totally confused... I've done other similar calculations but
never using 'OR'.
--
Thanks!
Barb
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default "OR" in Formula

"Barb" wrote:
I'm trying to create a formula that basically says:
IF a2 = BC or WWW, then insert the number 60,
else if a2 = FR or FH, then insert the number 120,
else if a2 = SS or BS or PS or AS, then insert the
number 200.


If that exhausts all possible conditions, then:

=IF(OR(A2={"BC","WWW"}),60,
IF(OR(A2={"FR","FH"}),120,200))

Alternatively:

=LOOKUP(A2,
{"BC","WWW","FR","FH","SS","BS","PS","AS"},
{60,60,120,120,200,200,200,200})

But if there are other possibilities that you neglect to cover, then:

=IF(OR(A2={"BC","WWW"}),60,
IF(OR(A2={"FR","FH"}),120,
IF(OR(A2={"SS","BS","PS","AS"}),200,"")))


----- original message -----

"Barb" wrote:

I'm trying to create a formula that basically says:
IF a2 = BC or WWW, then insert the number 60, else if a2 = FR or FH, then
insert the number 120, else if a2 = SS or BS or PS or AS, then insert the
number 200.

This has me totally confused... I've done other similar calculations but
never using 'OR'.
--
Thanks!
Barb

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default "OR" in Formula

Hi,

try this

=IF(OR(A2="BC",A2="WWW"),60,IF(OR(A2="fr",A2="fh") ,120,IF(OR(A2="SS",A2="PS",A2="AS"),200,"")))

all in 1 line
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Barb" wrote:

I'm trying to create a formula that basically says:
IF a2 = BC or WWW, then insert the number 60, else if a2 = FR or FH, then
insert the number 120, else if a2 = SS or BS or PS or AS, then insert the
number 200.

This has me totally confused... I've done other similar calculations but
never using 'OR'.
--
Thanks!
Barb

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default "OR" in Formula

What you've asked for is this:
=IF(OR(A2="BC",A2="WWW"),60,IF(OR(A2="FR",A2="FH") ,120,IF(OR(A2="SS",A2="BS",A2="PS",A2="AS"),200,"n ot
in list")))

Personally, I would create a list, and use Vlookup.

Regards,
Fred

"Barb" wrote in message
...
I'm trying to create a formula that basically says:
IF a2 = BC or WWW, then insert the number 60, else if a2 = FR or FH, then
insert the number 120, else if a2 = SS or BS or PS or AS, then insert the
number 200.

This has me totally confused... I've done other similar calculations but
never using 'OR'.
--
Thanks!
Barb


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default "OR" in Formula

hi
try..
=IF(OR(A2="BC",A2="WWW"),60,IF(OR(A2="FR",A2="FH") ,120,IF(OR(A2="SS",A2="BS",A2="PS",A2="AS"),200,"" )))

careful. the formula wrapped

Regards
FSt1
"Barb" wrote:

I'm trying to create a formula that basically says:
IF a2 = BC or WWW, then insert the number 60, else if a2 = FR or FH, then
insert the number 120, else if a2 = SS or BS or PS or AS, then insert the
number 200.

This has me totally confused... I've done other similar calculations but
never using 'OR'.
--
Thanks!
Barb

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula Result is "V6", need Excel to use cell "V6", not the resul Erik Excel Worksheet Functions 3 September 5th 08 03:10 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 11:45 PM.

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"