Testing to see date in a cell is = to today.

dude0216

New Member
Joined
Nov 28, 2005
Messages
11
I have a spreadsheet that has a column with the due date of bills that need to be paid. I would like to subtract five dyas from the due date and the see if that date is equal to todays date. if it is equal, I would like to send and email to my self with all the information in the row.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I am not sure about the emailing portion, but a formula that you could use in a cell to tell you if a due date is 5 days out from today would be:

=IF((G5-5)<=TODAY(),"Due","Not Yet Due")


Assuming G5 has the due date, "Due" will be displayed if the value in G5 is up to 5 days away from the current date (note the less-than-or-equal-to notation). If it is greater than 5 days out, it displays "Not Yet Due".

Can someone else assist with the VB code for the email function?

HTH
colbymack
 
Upvote 0
Thanks for the prompt reply, I am looking to use this in a macro, would it be possible for you to tell me how to use this in a macro?
 
Upvote 0
Look for the posting by Mordeth titled "Scan down a column to compare dates". He has asked for the same info that you are looking for. He does not have the emailing portion posted, but does have an answer on how to put the date evaluation into the macro code.
 
Upvote 0
J844929 has a post titled "Send email depending on cell values" that discusses the email portion. You may have to look for others depending on your email system.

HTH,
Colbymack
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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