VBA to Rename Worksheets Based on Contents in Sheet 1

rcschmidt88

New Member
Joined
Jul 15, 2019
Messages
6
Hello everyone,

This is my first time posting on here, and I'm very new to Excel VBA code, so I would appreciate some help. I have an Excel workbook with 7 sheets. The 1st one is a reference sheet titled Allocation, where I type in names of accounts into cells A3:A5. For the purpose of this question, lets say A3 is Red Account, A4 is Blue Account, and A5 is Yellow Account.

Here are the names I would like for the sheets:
Sheet 2: Red Account Sell Proposal
Sheet 3: Red Account Cost Basis
Sheet 4: Blue Account Sell Proposal
Sheet 5: Blue Account Cost Basis
Sheet 6: Yellow Account Sell Proposal
Sheet 7: Yellow Account Cost Basis

So basically for each account named in A3:A5, I would like 2 sheets, one for sell proposal and one for cost basis. I would like these name changes to be based on changing the text in cells A3:A5 of sheet one. So if I changed "Red Account" in cell A3 to "IRA", then I would want to change sheet 2 to "IRA Sell Proposal" and sheet 3 to "IRA Cost Basis". If you could please be specific about where to paste the VBA code as well, that would be great.

Thanks a ton!
 
Wow! I just made that correction and it worked! I've been working on this for days and watched countless videos to no avail, so I'm very appreciative that you spent the time to specifically help me.
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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