# 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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

#### 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
8
Views
306
Replies
6
Views
238
Replies
3
Views
81
Replies
4
Views
170
Replies
3
Views
60

1,127,345
Messages
5,624,131
Members
416,012
Latest member
rockermom59

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