Intuitive Macro that changes based on cell value

DonFlak

New Member
Joined
May 26, 2011
Messages
4
I don't know if this is possible but I am hoping so. I run several performance reports daily and weekly. On Monday's I have to run the reports twice, once to compile the prior week recap and the second time to produce the current weeks performance. Currently between runs, I have to archive the prior files and reset the data sources. Basically, I open Data2 and resave it as Data1, so the macro will look to the correct data source. In my Report Dashboard I have a fiscal week indicator, currently 35.

I have a macro that will save the prior weeks files with a reporting week in the title.

EXAMPLE:
ActiveWorkbook.SaveAs Filename:= _
"P:\Finance\central\Finance\Daily\Report_WK34.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

The code works fine but of course I have to manually change the week number each week. I am looking for a macro that would look at the fiscal week indicator in my dashboard

Sheets("Dashboard").Select
Range("C1").Select
ActiveCell.FormulaR1C1 = "35"

and change the macro to match the indicator Dashboard, Cell C1, so I can eliminate this manual process.

Is this even possible and if so, HELP! How can I achieve this?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi

How about something like this:

ActiveWorkbook.SaveAs Filename:= _
"P:\Finance\central\Finance\Daily\Report_WK" & Sheets("Dashboard").Range("C1").Value & ".xls" _ etc......

Andrew

P.S. as per usual save a copy and test before you deploy live.
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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