How to stop a days counter

NTHOMSD

New Member
Joined
Oct 11, 2022
Messages
2
Office Version
  1. 2021
Platform
  1. Windows
Hi there

I have a spreadsheet that tracks dates/times etc and need a cell (C2) that can count the number of days since a given date (A2) but will stop counting once B2 has been input. So, we have:
A2= Date the property is made ready
B2= Date the property was let to a new tenant.
C2= Days the property is/was empty

We need to track the number of days a property is empty for, but while it is empty we need to know how long it's been empty for. So C2 needs to count days from A2 until TODAY, but once a date has been input to B2, C2 needs to automatically calculate the difference between A2 and B2.

Apologies if this is not clear.

Thanks for your help!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(B2="",TODAY(),B2)-A2
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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