I have a worksheet that has a sent date and expected delivery date I need create a macro that will alert me if today's date is within 5 days of expected delivery date. please help
I have a worksheet that has a sent date and expected delivery date I need create a macro that will alert me if today's date is within 5 days of expected delivery date. please help
Hi, and welcome to the forum.
No need for a macro. Just name the delivery date cell "deliverydate" and the today date cell "todaysdate", then use the following function.
You could also usefully put a conditional format on the cell that contains that IF() function, and have the cell turn say red if true.Please Login or Register to view this content.
HTH
thanks for the welcome & actually I do need a macro. I give a bit more detail. I have a workbook that has po# date entered. info that goes w/ order. then a column for del. date & column for recv'd. what I the macro to do is if the del. date is w/in 5 days of today and the recv'd column is empty to turn it red so someone can be alerted since the work book is opened everyday. I pretty much have the rest of the macro figured out but not sure how to word w/in 5 days of today.
cf as
=AND(ISBLANK(B2),TODAY()-A2<=5)
wher b2 is rec date and a2 deliv date
Use Conditional Formatting
http://www.excel-it.com/excel_condit...formatting.htm
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
conditional formatting not working the way i need it to any other suggestions i can plug into a macro
Why is Conditional Formatting not working?
I have 9 columns the third is the date the po is entered the 8th is the expected delivery date. the 9th is the received date. I need the entire row to be highlighted red when the delivery date is within 5 days of today when the received date is blank. conditional formating does not do that
Yes it does if you apply the formatting to the whole row
I have a whole workbook I'm trying to apply it to. And with your input I was able to highlight the range from 5 before today as well as 5 after today but I need it only if the received date is empty and so far with conditional formatting it just makes all the days red whether delivery date or received w/in that time frame and sadly not what i'm trying to do maybe i need another condition but as i understood it a macro would work better for a loop to repeat everyday maybe i'm wrong thanks for all the help
Last edited by ashmcclure; 09-23-2008 at 11:40 AM. Reason: added attachment
A macro won't work better, maybe your formats need adjusting. Attach a small exampole workbook
I just attached a sample to my previous post. with this workbook. I need the row to be highlight if the del. date column is within 5 days of today and the recv'd column is empty. all other information isn't vital. I have used real dates to help
There is no Conditional Format that i can see in the example. Does this work
Condition 1: Formula is: =$H$2=$I$2
Condition 2: Formula is: =TODAY()+5=$H$2
Thanks yeah I took out all conditioning formating so that it would be cleaned. I did try that and it didn't work. all it did was fill in the empty cells in h and I
here is a sample with what i want done automatically. I did it manually w/o cf or a macro. but this is what i would like the outcome to be from either cf or a macro. if I understand everything correctly a macro would be best. any help would be appreciated
this worked for me
=AND(ISBLANK(I2),TODAY()-H2<=5,TODAY()-H2>=0)
Last edited by martindwilson; 09-23-2008 at 02:37 PM.
Martin's code works but you must put $ before the I's and H's and have highlighted row 2 down (don't include row 1)
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
yep forgot the $,well i was leaving work and by the time i remembered was on train home!
ok yea that did work thanks. one more question. it highlight everything 5 days before today. i tried modifying it as another formula for 5 from now it did work. how would I do it as a second condition for everything 5 days from today with same conditions???
Also since this work book gets update monday - saturday when a new entry is entered will it automatically be included in the conditional formatting or would that have to be done everyday?
=AND(ISBLANK($I2),$H2-TODAY()<=5,$H2-TODAY()>=0)
will give it if its within 5 days in the future
as to new entries as long as you put the formating down as far as you feel you need new entries will be ok.
i wouldnt recoment trying to do the whole sheet tho.
inserted rows will need re-doing
depends on version of excel. conditional formating 65000+rows times number of columns will use too much memory.
so say you make 20 entry's a day and want a years worth just do from row
1 to about 8000 , dont format columms you're not using. say you're using a to z then only do that width, no point changing colours in cells that you are not looking at
THANKS, yea I'd say about 5000 entries a year. so I will put that into place the cf worked out great thank you very much
Ok so I got all the conditional formatting working just fine now I need to see if that can be filtered into a report that could be printed. I have attached another copy of the delivery date form complete with conditional formatting..
SIMPLE BREAK DOWN OF QUESTION: Can all highlighted items be combined so can be printed????? THANK YOU IN ADVANCE
Last edited by ashmcclure; 09-25-2008 at 05:52 PM. Reason: forgot attachment
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks