3 If Statements Q

J

John

I am trying to combine 3 If Statements and am unsure of the structure

The logic is if Cell A = Monday then carry out a certain formula; if cell A
= Tuesday then carry out a different formula and finally if cell A =
Wednesday carry out a third formula

Cell A must equal either Mon;Tue or Wed

I'm getting lost with the 'If' and 'or' parts

Thanks
 
B

Bob Phillips

=IF(A1="Monday", do_one-Thing,IF(A1="Tuesday",
do_another,IF(A1="Wednesday",and_finally,"")))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
A

Aladin Akyurek

With A1 housing 3-letter day names...

=CHOOSE(MATCH(A1,{"Mon","Tue","Wed"},0),X,Y,Z)

=IF(A1="Mon",X,IF(A1="Tue",Y,IF(A1="Wed",Z,"")))

where you need to substitute appropriate formula expressions for X, Y, and
Z.
 
J

John

Thanks Bob, my formula below works for the first 2 (Food and Condiment) but
when I change the Cell D9 to Condiment the cost column returns a FALSE value

=IF(C9="Food",INDEX(Food_Unit_Costs,MATCH(D9,Food,0)),IF(C9="Paper",INDEX(Pa
per_Unit_Costs,MATCH(D9,Paper,0),IF(C9="Condiment",INDEX(Condiment_Unit_Cost
s,MATCH(D9,Condiment,0))))))
 
A

Aladin Akyurek

E9:

=MATCH(C9,{"Food","Paper","Condiment"},0)

F9:

=IF(ISNUMBER(E9),INDEX(CHOOSE(E9,Food_Unit_Costs,Paper_Unit_Costs,Condiment_
Unit_Costs),MATCH(D9,CHOOSE(E9,Food,Paper,Condiment),0)),"")
 

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

Top