# Number of days remaining based on 3 dates

#### Brian2me

##### New Member
Hello Exel Guru's,
I'm trying to calculate the either number of days remaining or the numbers of days between start and finish if an finish date has been entered.
A2 = Start Date = 01 Jan 21
B2 = Target Date = 01 Mar 21
C2 = Actual Date Completed = 01 Feb 21

D2 = if C2 = Blank then calculate B2-today() to calculate number of days left to complete task, but if C2 has a completed date then B2-A2 to understand number of days it took to complete task

### Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

#### etaf

##### Well-known Member
=IF ( C2 = "" , B2 - today() , B2 - A2 )

Would that be C2 - A2 actual days to complete ? rather than B2 - A2 , which is target date - start date and would not change

=IF ( C2 = "" , B2 - today() , C2 - A2 )

#### Brian2me

##### New Member
Thanks you etaf, yes you were correct with the 2nd option. Disappointed that I didn't figure the formula out. I had used =if(C2="","", B2 - today() , B2 - A2)) but obviously failed due to first section

you are welcome

Replies
1
Views
57
Replies
8
Views
362
Replies
6
Views
300
Replies
3
Views
114
Replies
4
Views
198

1,129,714
Messages
5,637,940
Members
416,993
Latest member
ant8989

### 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.

### Which adblocker are you using?

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

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