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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

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