Calculating days between two dates where one cell is empty

Dan012

New Member
Joined
Jun 25, 2011
Messages
9
Hi everyone' I am trying to calculate the number of days between two dates (a start and an end date) and also where if the end date is left blank it calculates today as the end date.

This is to calculate the number of days on market for a product.

Eg. Cell A5 is the start date, cell B5 is the end date of the event I.e sold. (The end date may not be filled in as yet if the product is not yet sold). Cell C5 is the answer with total number of the products days on the market including if it still for sale e.g 54 days on market.

So I need a formula that will calculate the number of days between A&
B column if they are completed and also assume that cell B5 is today's date if it is left blank.

Any help will be greatly appreciated.
 
You will probably get incorrect results when F3 < K1 as well.

Try =MIN($K$1,F3)-MAX(I$1,E3)+1
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I know this thread is old, but none of these worked for me, so I played around and came up with this:

Excel Formula:
=IF(A5="","",IF(B5>0,B5-A5,TODAY()-A5))

Just in case anyone else comes looking, this worked for me! :)
 
Upvote 0

Forum statistics

Threads
1,222,636
Messages
6,167,222
Members
452,104
Latest member
jadethejade

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