Number of days if no end date

bgrove

Board Regular
Joined
Dec 2, 2013
Messages
60
Hi,
I need to calculate the number of days when I have the start date but I do not have the end date (meaning the project is still open).

I have two columns
Start date = 1/1/2018
End date = blank

I used =DATEDIF(A1,Today(),"d") but it does not account for cells that have End Dates in them.

Start------ End----- #Days
Date------ Date
1/1/2018- blank------ 74 (using the formula above)
1/1/2018 - 2/10/18---74 (using the formula above. It seems I need another IF statement to check for blanks then use the DATEIF formula)

Just need another's perspective and formula suggestion on this one.

Thank you,

Bev
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Bev, Good afternoon.

Try to use:

=IF(B1="",DATEDIF(A1,Today(),"d");"")

Is that what you want?

I hope it helps.
 
Upvote 0
Hi,

I don't use DATEDIF, here're a couple of options:


Book1
ABCD
1Start DateEnd Date#Days
21/1/20187474
31/1/20182/10/20184040
Sheet22
Cell Formulas
RangeFormula
C2=IF(B2="",TODAY()-A2,B2-A2)
D2=IF(B2="",DAYS(TODAY(),A2),DAYS(B2,A2))


Formulas copied down. Columns C and D formatted General or Number.
 
Upvote 0
Hi,

I don't use DATEDIF, here're a couple of options:

ABCD
Start DateEnd Date#Days

<colgroup><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]1/1/2018[/TD]
[TD="align: right"][/TD]
[TD="align: right"]74[/TD]
[TD="align: right"]74[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]1/1/2018[/TD]
[TD="align: right"]2/10/2018[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]40[/TD]

</tbody>
Sheet22

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C2[/TH]
[TD="align: left"]=IF(B2="",TODAY()-A2,B2-A2)[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D2[/TH]
[TD="align: left"]=IF(B2="",DAYS(TODAY(),A2),DAYS(B2,A2))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



Formulas copied down. Columns C and D formatted General or Number.
Yes, this works!!! Thank you.......However as I progressed through the data I need another If statement that says "Not Started" when there is not a start date or an end date. Which means the project has not began yet. Any suggestions on what additional formula's I can add?
 
Upvote 0
You're welcome, you didn't say which formula you went with, so I modified both:


Book1
ABCD
1Start DateEnd Date#Days
21/1/20187474
31/1/20182/10/20184040
4Not StartedNot Started
51/5/20183/14/20186868
Sheet22
Cell Formulas
RangeFormula
C2=IF(A2="","Not Started",IF(B2="",TODAY()-A2,B2-A2))
D2=IF(A2="","Not Started",IF(B2="",DAYS(TODAY(),A2),DAYS(B2,A2)))


Is it possible to have an End Date, but no Start Date?
 
Last edited:
Upvote 0
You're welcome, you didn't say which formula you went with, so I modified both:

ABCD
Start DateEnd Date#Days
Not StartedNot Started

<colgroup><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]1/1/2018[/TD]
[TD="align: right"][/TD]
[TD="align: right"]74[/TD]
[TD="align: right"]74[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]1/1/2018[/TD]
[TD="align: right"]2/10/2018[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]40[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]1/5/2018[/TD]
[TD="align: right"]3/14/2018[/TD]
[TD="align: right"]68[/TD]
[TD="align: right"]68[/TD]

</tbody>
Sheet22

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C2[/TH]
[TD="align: left"]=IF(A2="","Not Started",IF(B2="",TODAY()-A2,B2-A2))[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D2[/TH]
[TD="align: left"]=IF(A2="","Not Started",IF(B2="",DAYS(TODAY(),A2),DAYS(B2,A2)))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



Is it possible to have an End Date, but no Start Date?

I'm sorry I went with the first formula. Thank you for sharing I learned something new! The first formula worked again

Thank you,

Bev
 
Upvote 0
You're very welcome, glad to help.
 
Upvote 0
Can this same formula be applied to include working days instead of calendar days? I'm having a hard time getting them to work together.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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