If... then?

CarpeDM

New Member
Joined
Sep 9, 2013
Messages
4
I have to calculate the days after we receive a notice to when we have to reply. I have two columns column A contains a date when the form was sent out but sometimes I don't have the date the form was sent and I have to go by when the form was filled out (column B). my formula in column C is "=date(year(a1),month(a1),day(a1)+15)" But when I only have the date the form was filled out then my formula in column C is "=date(year(b1),month(b2),day(b2)+15)".

My question is:

Is there a formula I could enter into column C that would select which column to use? And say if I have both dates and I want to use the later one, is that possible?

Any help would be greatly appreciated.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Maybe too easy.. Don't know. I might miss something:

Code:
 =if(b1>a1,date(year(b1),month(b1),day(b1)+15),date(year(a1),month(a2),day(a2)+15))
 
Last edited:
Upvote 0
If B1 and B2 are both formatted as dates (not text) then you only need:

C1: =MAX(A1+15,B1+15)

Make sure C1 is also formatted as a date.
 
Upvote 0
Thank you both! They both worked out, and just for simplicity i'm going to use the shorter one. Thank you agian.
 
Upvote 0

Forum statistics

Threads
1,215,494
Messages
6,125,139
Members
449,207
Latest member
VictorSiwiide

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top