Trying to run a report using system day/date

RunTime91

Active Member
Joined
Aug 30, 2012
Messages
262
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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Drrellik

Well-known Member
Joined
Apr 29, 2013
Messages
773
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2011
  5. 2010
Platform
  1. Windows
=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
 

RunTime91

Active Member
Joined
Aug 30, 2012
Messages
262
=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?
 

Drrellik

Well-known Member
Joined
Apr 29, 2013
Messages
773
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2011
  5. 2010
Platform
  1. Windows
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,199
Messages
5,835,936
Members
430,396
Latest member
dzifna

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
Top