Combining IF and OR Functions

  • Thread starter ConfusedNHouston
  • Start date
C

ConfusedNHouston

I want to write a statement that effectively does the following:

IF Cell-value = A OR B OR C, THEN ENTER 1000

Ideally, I'd like to nest a 2nd and 3rd statement using this logic

Like:

IF Cell-value = A OR B OR C, then enter 1000, IF Cell-value of the same cell
= D OR F, then enter 2000, IF Cell-value of that same cell = Z, then 0

Can I do this? If so, what is the proper syntax?

Thanks
 
B

Bob Phillips

=IF(OR(A1="A",A1="B",A1="C"),1000,IF(OR(A1="D",A1="F"),2000,IF(A1="Z",0,"???
")))

you didn't give the default value

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
R

Ron Coderre

Try something like this:

For a value in A1

B1: =SUM(COUNTIF(A1,{"A","B","C","D","F"})*{1,1,1,2,2})*1000

That formula is durable against blanks, numbers, or errors in A1.

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
Top