![]() |
Macros
I have a spreadsheet used for managing dates and deadlines where Column K is for DUE DATE, M for EXPIRY DATE, P for RENEWAL DATE.
What I would like is to have a macro which runs automatically on launch to print a range called "reminder" if DUE DATE has passed today's date. The macro should check all cells in the Column K and then its should start from column M and print a range called "reminder1" if EXPIRY DATE has passed today's date. The macro should check all cells in the Column M and then its should start from column P and print a range called "reminder2" if RENEWAL DATE has passed today's date. Any help would be most appreciated! Thanks, EggHeadCafe - Software Developer Portal of Choice WCF Workflow Services Using External Data Exchange http://www.eggheadcafe.com/tutorials...vices-usi.aspx |
Macros
You want to use an Auto_Open
This would go in a Module in VBA (Not on This workbook or an individual sheet) Sub Auto_Open() A=1 reminder= "Rows " reminder1 = "Rows " reminder2 = "Rows " Do while Sheets("Sheet 1").cells (A,11)<empty if Cells(A,11)<Date then reminder=reminder & Cstr(A)&", " if Cells(A,13)<Date then reminder=reminder & Cstr(A)&", " if Cells(A,15)<Date then reminder=reminder & Cstr(A)&", " A=A+1 Loop Sheets.Add After:=Sheets(Sheets.Count) if reminder="Rows " then reminder="None" if reminder1="Rows " then reminder1="None" if reminder2="Rows " then reminder2="None" Range("A1")= "Due Date past" Range("b1")=reminder Range("A1")= "EXPIRY DATE past" Range("b1")=reminder1 Range("A1")= "RENEWAL DATE past" Range("b1")=reminder ActiveWindow.SelectedSheets.PrintOut Copies:=1 end sub -- If this helps, please remember to click yes. "Zuke Kahn" wrote: I have a spreadsheet used for managing dates and deadlines where Column K is for DUE DATE, M for EXPIRY DATE, P for RENEWAL DATE. What I would like is to have a macro which runs automatically on launch to print a range called "reminder" if DUE DATE has passed today's date. The macro should check all cells in the Column K and then its should start from column M and print a range called "reminder1" if EXPIRY DATE has passed today's date. The macro should check all cells in the Column M and then its should start from column P and print a range called "reminder2" if RENEWAL DATE has passed today's date. Any help would be most appreciated! Thanks, EggHeadCafe - Software Developer Portal of Choice WCF Workflow Services Using External Data Exchange http://www.eggheadcafe.com/tutorials...vices-usi.aspx |
Macros
That last part should be:
Range("A1")= "Due Date past" Range("b1")=reminder Range("A2")= "EXPIRY DATE past" Range("b2")=reminder1 Range("A3")= "RENEWAL DATE past" Range("b3")=reminder And remember to change the sheet name from Sheet 1 to whatever your sheet is called -- If this helps, please remember to click yes. "Paul C" wrote: You want to use an Auto_Open This would go in a Module in VBA (Not on This workbook or an individual sheet) Sub Auto_Open() A=1 reminder= "Rows " reminder1 = "Rows " reminder2 = "Rows " Do while Sheets("Sheet 1").cells (A,11)<empty if Cells(A,11)<Date then reminder=reminder & Cstr(A)&", " if Cells(A,13)<Date then reminder=reminder & Cstr(A)&", " if Cells(A,15)<Date then reminder=reminder & Cstr(A)&", " A=A+1 Loop Sheets.Add After:=Sheets(Sheets.Count) if reminder="Rows " then reminder="None" if reminder1="Rows " then reminder1="None" if reminder2="Rows " then reminder2="None" Range("A1")= "Due Date past" Range("b1")=reminder Range("A1")= "EXPIRY DATE past" Range("b1")=reminder1 Range("A1")= "RENEWAL DATE past" Range("b1")=reminder ActiveWindow.SelectedSheets.PrintOut Copies:=1 end sub -- If this helps, please remember to click yes. "Zuke Kahn" wrote: I have a spreadsheet used for managing dates and deadlines where Column K is for DUE DATE, M for EXPIRY DATE, P for RENEWAL DATE. What I would like is to have a macro which runs automatically on launch to print a range called "reminder" if DUE DATE has passed today's date. The macro should check all cells in the Column K and then its should start from column M and print a range called "reminder1" if EXPIRY DATE has passed today's date. The macro should check all cells in the Column M and then its should start from column P and print a range called "reminder2" if RENEWAL DATE has passed today's date. Any help would be most appreciated! Thanks, EggHeadCafe - Software Developer Portal of Choice WCF Workflow Services Using External Data Exchange http://www.eggheadcafe.com/tutorials...vices-usi.aspx |
All times are GMT +1. The time now is 07:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com