How Do I Show # of Days Before Today's Date?

bencar

Banned user
Joined
Jun 8, 2016
Messages
149
In one column in my sheet it says '=TODAY()-31' when I click in it. The date happens to be 31 days before today's date. How do I format a column of past dates like this so that when I click in the cell I see '=TODAY()-31' where the '-31' part shows the amount of days before today's date?
 
Last edited:
Re: Strange Formatting When Clicking a Cell

Just change your format to GENERAL or NUMBER and you will get 14.

I do that but then the date changes to 0. Why would you suggest changing the date format to number?? I dont get it.

Did you see the link to my spreadsheet in my 1st post?
 
Last edited:
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Re: Strange Formatting When Clicking a Cell

Because dates are stored as numbers in Excel
In the example below 43190 in cell A3 is 3/31/18 formatted as a number.
From Microsoft Office Support:
https://support.office.com/en-us/article/date-function-e36c0c8c-4104-49da-ab83-82328b832349

Note: Excel stores dates as sequential serial numbers so that they can be used in calculations. January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,447 days after January 1, 1900. You will need to change the number format (Format Cells) in order to display a proper date.
Excel Workbook
AB
13/31/201814
2
343190
Sheet
 
Upvote 0
Re: Strange Formatting When Clicking a Cell

Because dates are stored as numbers in Excel
In the example below 43190 in cell A3 is 3/31/18 formatted as a number.
From Microsoft Office Support:
https://support.office.com/en-us/article/date-function-e36c0c8c-4104-49da-ab83-82328b832349

Note: Excel stores dates as sequential serial numbers so that they can be used in calculations. January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,447 days after January 1, 1900. You will need to change the number format (Format Cells) in order to display a proper date.

AB

<tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]3/31/2018[/TD]
[TD="align: right"]14[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]43190[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
B1=TODAY()-A1

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

Ok I think I understand now.. Thanks you!

And I thank the rest of the guys who put in their effor in trying to help me. I apologize for being such an donkey's rear end somethimes !!
 
Last edited:
Upvote 0
Re: Strange Formatting When Clicking a Cell

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.

I have merged both threads
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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