Does =days() stealing 1 day each time

msword

Board Regular
Joined
Oct 23, 2020
Messages
54
Office Version
  1. 2019
Platform
  1. Windows
  2. MacOS
Just noticed that today is not included in the excel day counter, namely cell value equals to zero. Does it mean that 1 day was stealed all these years of using the formula? Is there an elegant way to fix this or remembering to add +1 in the end of the formula is a single option?

Book2
AB
1023-Oct
Sheet1
Cell Formulas
RangeFormula
A1A1=DAYS(TODAY(), B1)
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
DAYS is not used to count days, per se.
DAYS calculates the DIFFERENCE between two dates.
If you are comparing today's date, with the TODAY() function, they are returning the same date (10/23).
Since it is the SAME date, there is no difference, so the function returns 0.
If you are trying to use it as a day counter, yes, you will need to always add 1 to your result.
 
Upvote 0
You don't really need the DAYS function though, you can just subtract them and format as General.
=B1-TODAY()+1
 
Upvote 0
Solution
You don't really need the DAYS function though, you can just subtract them and format as General.
=B1-TODAY()+1
That is a good point. Since dates are stored as numbers, specifically the numbers of DAYS since 1/0/1900, then you can simply subtract the values (provided that your actual date value does NOT have a time component).
 
Upvote 0
Is there a way to avoid using the B1 date cell altogether and incorporate the date right into the formula?
 
Upvote 0
If you are trying to use it as a day counter, yes, you will need to always add 1 to your result.
I understand that, but my question is there any suitable formula for the counter creation to avoid adding +1 manually each time?
You don't really need the DAYS function though, you can just subtract them and format as General.
=B1-TODAY()+1
Thanks for bringing this out! I really fed up to manually return cells to the General format each time. This saved me from creating another thread.
 
Upvote 0
@Scott Huish
Is there a way to avoid using the B1 date cell altogether and incorporate the date right into the formula?
 
Upvote 0
@Scott Huish
Is there a way to avoid using the B1 date cell altogether and incorporate the date right into the formula?
I am not sure this makes much sense. B1 is the date you using in the calculation, comparing to the current date, right?
If you don't have another date, exactly what are you trying to do?

Could you show us a detailed example of exactly what you are trying to do?
Maybe it will make more sense if we can see that.
 
Upvote 0
Yes, but as Joe4 mentioned, why would you want to do that?
="10/23/2024"-TODAY()+1
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
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