Compare Dates

Ian Cowden

New Member
Joined
Jan 16, 2019
Messages
3
I would like to compare a date to today to display the following where the date is in cell A1


If A1=Today then "Due Today"
If A1 Greater than Today then "Overdue"
If A1 Less than Today then "Due in x Days"(where x is the number of days until the date in A1)


Any ideas


Ian
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
did you mean to swap greater and less than?
if the date in A1 is greater than today it should be in the future
 
Upvote 0
maybe like this?


Book1
AB
110/01/2019Overdue
216/01/2019Overdue
317/01/2019Due Today
422/01/2019Due in 5 days
528/01/2019Due in 11 days
63/02/2019Due in 17 days
79/02/2019Due in 23 days
Sheet32
Cell Formulas
RangeFormula
B1=IF(A1=TODAY(),"Due Today",IF(A1),"Overdue","Due in "&A1-TODAY()&" days"))
 
Upvote 0
Copy Down Formula in Cell B1

Excel 2010
AB

<tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]1/16/2019[/TD]
[TD="align: center"]Due Today[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]1/21/2019[/TD]
[TD="align: center"]Due in 5[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]1/10/2019[/TD]
[TD="align: center"]Overdue[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH]B1[/TH]
[TD="align: left"]=IF(A1=TODAY(),"Due Today",IF(A1>TODAY(),"Due in "& A1 - TODAY() & " days","Overdue"))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,263
Members
452,627
Latest member
KitkatToby

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