VBA - Run macro if last day of the week

OldAndWeak182

New Member
Joined
Apr 29, 2021
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Hello,
My example: in A I have the 5 days of the working week and a list of stuff next to.
Every 5 days I create a summary of the week in 2 rows (with formula).
After this I created a button that runs a macro that copies the table format and formula extending next 5 days and creates the weekly report rows.
I would like it to run the macro by itself when it reaches the 5th day of the week. I hope I was clear, I have a bit of difficulty in translating...

Max
 
My code doesn't need the column to be a date ! and doesn't use it as a variable !
The code I provided counts the cells from col "B" to Col "Q" If the are ALL blank it then moves onto
If today is Friday... run the code
nothing to do with what is in Col "A"
I didn't understand anything LOL.
Then I might have a problem because it is not said that the sheet will be opened on Friday, my aim is to make sure that when any cell of every Friday "of the date column" is filled then it has to run the macro. To do this I thought I could rely on column A but it is not formatted as a date because otherwise I would not be able to do the "trick" of copying the standard from the "layout" tab. I have no other ideas ...
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
You won't be able to automatically run a macro in a closed workbook, unless it is called from another Open workbook.
 
Upvote 0

Forum statistics

Threads
1,216,558
Messages
6,131,400
Members
449,648
Latest member
kyouryo

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