# How to stop a days counter

#### NTHOMSD

##### New Member
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:
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.

### Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

#### Fluff

##### MrExcel MVP, Moderator
Hi & welcome to MrExcel.
Excel Formula:
``=IF(B2="",TODAY(),B2)-A2``

#### NTHOMSD

##### New Member
Hi & welcome to MrExcel.
Excel Formula:
``=IF(B2="",TODAY(),B2)-A2``

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback.

Replies
4
Views
171
Replies
1
Views
45
Replies
17
Views
279
Replies
29
Views
333
Replies
2
Views
335

1,186,777
Messages
5,959,724
Members
438,443
Latest member
azedin4

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