Hi,
I've got a macro that will take data from a worksheet, generate a Pivot Table and then create a Pivot Chart. This works fine (and thanks for the help in the past!)
Currently the Pivot Chart ends up with a generic name. I would like to rename the Pivot Chart with the name of the company, which comes from the initial worksheet.
Once the macro has run, I have worksheet 2 with the original data, and worksheet 1 with the pivot chart and table. The worksheet with the initial data on it has a name like:
Company_A_daily_report_7802a
I would like to:
- Get the name of the worksheet with the data
- Trim the name of the worksheet, to get rid of "daily_report_7802" (or whatever the number at the end is). Sometimes the word "report" is truncated to "repo" or similar.
- Use the shorter worksheet name to rename the Pivot Chart, which was created on Worksheet 1.
Thank you for any help!
Jeff
I've got a macro that will take data from a worksheet, generate a Pivot Table and then create a Pivot Chart. This works fine (and thanks for the help in the past!)
Currently the Pivot Chart ends up with a generic name. I would like to rename the Pivot Chart with the name of the company, which comes from the initial worksheet.
Once the macro has run, I have worksheet 2 with the original data, and worksheet 1 with the pivot chart and table. The worksheet with the initial data on it has a name like:
Company_A_daily_report_7802a
I would like to:
- Get the name of the worksheet with the data
- Trim the name of the worksheet, to get rid of "daily_report_7802" (or whatever the number at the end is). Sometimes the word "report" is truncated to "repo" or similar.
- Use the shorter worksheet name to rename the Pivot Chart, which was created on Worksheet 1.
Thank you for any help!
Jeff