combine two formula in one cell

  • Thread starter Thread starter Mrugesh Shah
  • Start date Start date
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))
 
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)))
 
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
 
Thank you, but how do I get it to calculate years based on the contents in
cell E42?
 
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
 

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

Back
Top