If/Or Formula

K

Karen Smith

I need a formula to say if cell A5 = Brochure OR Datasheet OR SolutionBrief,
than place an A in the cell, if A5 = Whitepaper or ExecutiveBrief, than place
a B in the cell, if A5 = CESuper, than place a C in the cell or if cell A5 =
CaseStudy, than place a D in the cell.

Can anyone help? Thanks in advance
 
J

J. Sperry

Not sure this is the best way, but

=IF(OR(A5="Brochure",A5="Datasheet",A5="SolutionBrief"),"A",IF(OR(A5="Whitepaper",A5="ExecutiveBrief"),"B",IF(A5="CESuper","C",IF(A5="CaseStudy","D",""))))
 
P

Peo Sjoblom

A couple of ways

=IF(OR(A5={"Brochure";"Datasheet";"SolutionBrief"}),"A",IF(OR(A5={"Whitepaper";"ExecutiveBrief"}),"B",IF(A5="CESuper","C",IF(A5="CaseStudy","D",""))))



=IF(ISNUMBER(MATCH(A5,{"Brochure";"Datasheet";"SolutionBrief";"Whitepaper";"ExecutiveBrief";"CESuper";"CaseStudy"},0)),VLOOKUP(A5,{"Brochure","A";"Datasheet","A";"SolutionBrief","A";"Whitepaper","B";"ExecutiveBrief","B";"CESuper","C";"CaseStudy","D"},2,0),"")


--


Regards,


Peo Sjoblom
 
D

Don Guillett

Modify to suit
=IF(OR(K8={"b","d","s"}),1,IF(OR(K8={"w","e"}),2,IF(K8="ce",3,IF(K8="cs",4,""))))
 
B

Bob Phillips

=IF(OR(A5="Brochure",A5="Datasheet",A5="SolutionBrief"),"A",
IF(OR(A5="Whitepaper",A5="ExecutiveBrief"),"B",
IF(A5="CESuper","C","D")))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
E

edegrund

I have a simular problem. Bud a bit more complicated.
in collom C, in cell C2 I fill in the date in the format: dd-mm-yy
in collum B, in cell B2 I have the function: =IF(C2>1/1/1900;C2;""). with
format: dddd
So if I enter de date: 07-01-2008 in cell C2 that results in Cell B2 in:
monday
Now I want a formula in C3 that ads a day to C2 but only if C2 is a (mon,
thu, wed, thursday). If it is a fryday it must ad 3 days to come up with a
monday again. So if I copy the formula downwards I only get weekdays.
the problem is that the formula doesn't see the outcome of C2 as monday but
as an date. Can someone help me or am I not clear?
 
D

David Biddulph

In your IF formula you are testing for C2 being greater than 1 divided by 1
and then divided by 1900.
If you are trying to compare with the date of 1st Jan 1900 you can compare
with DATE(1900,1,1), or with --("1/1/1900"), or with 1 (but of course the
dividing line you've got is fractionally less than a day earlier).

As far as your stepping forward in weekdays is concerned, look in Excel help
at the WORKDAY function.

If you don't want to see the content of C2 as a date but as Monday, then
format as dddd.
 
Top