Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that a user will run every day to gather information fro
another spreadsheet. Right now the user has to delete the previous days info and run th macro. Is there a way I can have the macro test to see if the day of the wee has changed, then to delete cells D3,D4,D5 & D6 and run the macro? Also, i'd like to use the =now() function in the macro for cell A7 tha when the macro runs, it tell the operator (sometimes a different person when the program ran last? thank -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if the day of the week has changed from what? Are we comparing the day of
the week for today against the day of the week recorded where? =Now will recalculate every time the sheet calculates - so it will change every day (it isn't static). . You can have your macro just put in the date as part of the work that it does. Worksheets("Sheet3").Range("A7").Value = Date -- Regards, Tom Ogilvy "alexm999 " wrote in message ... I have a macro that a user will run every day to gather information from another spreadsheet. Right now the user has to delete the previous days info and run the macro. Is there a way I can have the macro test to see if the day of the week has changed, then to delete cells D3,D4,D5 & D6 and run the macro? Also, i'd like to use the =now() function in the macro for cell A7 that when the macro runs, it tell the operator (sometimes a different person) when the program ran last? thanks --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the macro is run on Monday it will populate the cells, when the macro
is rerun on tuesday, i need Monday numbers to be deleted prior to the macro running cause it can through the formula off.. --- Message posted from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I thought that was the whole point of the question, to have the macro clear
the cells. If I run it on monday and check it on tuesday, the cells will be populated. If I run it on Tuesday and check it on Wednesday, the cells will be populated from Tuesday's run. Where is the difference? As I said what do you want to check against. If all you want to check against is that the cells are populated, why bother, just clear them. If they are populated or not the results are the same. Range(D3:D6").Clearcontents -- Regards, Tom Ogilvy "alexm999 " wrote in message ... If the macro is run on Monday it will populate the cells, when the macro is rerun on tuesday, i need Monday numbers to be deleted prior to the macro running cause it can through the formula off.. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
option buttons run Click code when value is changed via VBA code | Excel Programming | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming |