combine two formula in one cell

M

Mrugesh Shah

How do I combine these two formulas for result in one cell

=IF(OR(E42="s417t401-43",E42="s417t401-44"),DATE(YEAR(G42)+15,MONTH(G42)+0,DAY(G42)+0))
=IF(OR(e42="123411-12",E42=123411-15"),date(year(G42)+10,month(g42)+0,day(g42)+0))
 
J

Joel

I connected the two formulas using an OR, you may want an AND

=OR(IF(OR(E42="s417t401-43",E42="s417t401-44"),DATE(YEAR(G42)+15,MONTH(G42)+0,DAY(G42)+0)),IF(OR(E42="123411-12",E42=123411-"15"),DATE(YEAR(G42)+10,MONTH(G42)+0,DAY(G42)+0)))
 
B

Bernie Deitrick

Mrugesh,

=IF(OR(E42="s417t401-43",E42="s417t401-44"),DATE(YEAR(G42)+15,MONTH(G42),DAY(G42)),IF(OR(E42="123411-12",E42="123411-15"),DATE(YEAR(G42)+10,MONTH(G42),DAY(G42)),"None
matched"))

HTH,
Bernie
MS Excel MVP
 
M

Mrugesh Shah

Thank you, but how do I get it to calculate years based on the contents in
cell E42?
 
M

Mrugesh Shah

Thank You :)

Bernie Deitrick said:
Mrugesh,

=IF(OR(E42="s417t401-43",E42="s417t401-44"),DATE(YEAR(G42)+15,MONTH(G42),DAY(G42)),IF(OR(E42="123411-12",E42="123411-15"),DATE(YEAR(G42)+10,MONTH(G42),DAY(G42)),"None
matched"))

HTH,
Bernie
MS Excel MVP
 
Top