3 If Statements Q

  • Thread starter Thread starter John
  • Start date Start date
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
 
=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)
 
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.
 
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))))))
 
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)),"")
 
Back
Top