ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Dates (https://www.excelbanter.com/excel-discussion-misc-queries/84537-dates.html)

sdmccabe

Dates
 
Could you please suggest a formula to compare the contents of two cells
containing date values and display the difference in days?

JE McGimpsey

Dates
 
One way:

A1: <date1
A2: <date2
A3: =A2-A1

Format A3 as General or another Number format.

this works since XL stores dates as integer offsets from a base date.

In article ,
sdmccabe wrote:

Could you please suggest a formula to compare the contents of two cells
containing date values and display the difference in days?


widman

Dates
 
You can also then use conditional formatting to A3 to change color if it is
within or outside of ranges you choose.

"JE McGimpsey" wrote:

One way:

A1: <date1
A2: <date2
A3: =A2-A1

Format A3 as General or another Number format.

this works since XL stores dates as integer offsets from a base date.

In article ,
sdmccabe wrote:

Could you please suggest a formula to compare the contents of two cells
containing date values and display the difference in days?




All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com