Copy values to new worksheet macro

linesy

Board Regular
Joined
Sep 27, 2004
Messages
72
Good morning all,

I have a worksheet that is linked elsewhere and consists of monthly and quarterly data that, dependent on the criteria, I need the quarterly and YTD data (Q1, Q2, Q3, Q4, Q1YTD, Q2YTD, Q3YTD Q4YTD), copy, paste, value into a separate tabs (Actuals Tabs) and divide the data in CYQTR and CYYR by 1,000,000, not the percentage data.

Data Sheets:
CYQTR, including named ranges CYQ1_, CYQ2_ and so forth
CYQPercentages. including named ranges CYQ1_ratio, CYQ2_ratio and so forth
CYYR, including named ranges CYQ1_YTD, CYQ2_YTD and so forth
CYercentages, including named ranges CYQ1_YTDratio, CYQ2_YTDratio and so forth

Result Sheets:
Q1 Actuals, including named ranges Q1_Act, Q1_YTDA, Q1_Ratio, Q1_YTDR
Q2 Actuals, including named ranges Q2_Act, Q2_YTDA, Q2_Ratio, Q2_YTDR
Q3 Actuals, including named ranges Q3_Act, Q3_YTDA, Q3_Ratio, Q3_YTDR
Q4 Actuals, including named ranges Q4_Act, Q4_YTDA, Q4_Ratio, Q4_YTDR

If Cell $O$2 on sheet name "Control Sheet" = "Q1"
Copy, paste, range name CYQ1 on sheet name "CYQTR" to sheet name "Q1 Actuals", named range Q1_Act
and range name CYQ1_YTD on sheet name "CYYR" to sheet name "Q1 Actuals", named range Q1_YTDA
and range name CYQ1_ratio on the sheet named "CYQPercentages" to sheet name "Q1 Actuals", named range Q1_ratio
and range name CYQ1_YTDratio on the sheet named "CYQPercentages" to sheet name "Q1 Actuals", named range Q1_YTDR

And so forth if the value changes in the "Control sheet to "Q2", "Q3" and "Q4".

Can anyone help please?
Thank you for your time.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,216,100
Messages
6,128,827
Members
449,470
Latest member
Subhash Chand

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