Trying to run a report using system day/date

RunTime91

Active Member
Joined
Aug 30, 2012
Messages
284
Office Version
  1. 365
Hello All ~

I am trying to have excel run a report based on the day of the week.

I have tried eleventeenhundred iterations of:

"If Weekday(Today()) = vbWednesday Then..."

The goal here is to not reference a cell with today's date, but rather have excel use its own system day/date to recognize, upon shutting down, if today is a "Wednesday" then run this report.

Any help would be greatly appreciated.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
=WEEKDAY(TODAY()) will return a value of 3. so =if(WEEKDAY(TODAY())=3,run report,don't run or nothing)

hope that helps

3= Wenesday
 
Upvote 0
=WEEKDAY(TODAY()) will return a value of 3. so =if(WEEKDAY(TODAY())=3,run report,don't run or nothing)

hope that helps

3= Wenesday

Drrellik ~ Thanks for chiming in ~

I tried and played around with different versions of the following:
Code:
If Weekday(Today()) = 3 Then
    'Run Report'
End If

but each time I get a "Subscript out of range" error


On another note,

I tried the following:
Code:
If Weekday(Now) = 3 Then
    'Run Report'
End If

And although it seems this method recognizes 4 as Wednesday it works - or at lease it appears to be working

Thoughts?
 
Upvote 0
my apologies, you are looking for some VBA for this. I was giving you a formula in an IF statement IF this = that, do this, if not do this.

I am not quite up to speed on VBA but I am learning. maybe someone else can help from here.
 
Upvote 0

Forum statistics

Threads
1,217,677
Messages
6,137,940
Members
450,099
Latest member
Pushbutton

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