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.
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

colbymack

Active Member
Joined
Jul 14, 2005
Messages
333
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
 

dude0216

New Member
Joined
Nov 28, 2005
Messages
11
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?
 

colbymack

Active Member
Joined
Jul 14, 2005
Messages
333
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.
 

colbymack

Active Member
Joined
Jul 14, 2005
Messages
333
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
 

Watch MrExcel Video

Forum statistics

Threads
1,118,909
Messages
5,574,985
Members
412,630
Latest member
Eireangel
Top