0
votes

I am trying to create some VBA code that will do the following:

  1. Take worksheets 2 and 3 from a number of different workbooks (all in the same folder) and put them into a new workbook.
  2. Worksheet 2 has the same name in each of the different workbooks so I want the VBA to also change the name of the new worksheet to a cell reference from the original worksheet (in this case cell A6)
  3. Worksheet 3 has the same name in each of the different workbooks so I want the VBA to also change the name of this new worksheet to the same cell reference (A6), combined with the text "ph"

Any help would be gratefully received

Rob

1
Where are you stuck at in the code? Can you share your progress so far?chancea
A quick search of this site yields quite a few solutions to accomplish this task, one example can be found heremrbungle

1 Answers

0
votes

You'll be able to figure out all of the code you need with the help of the Macro Recorder. Turn that on and manually do your listed steps (make sure you stop recording when that's done), then look for pieces of code that move the worksheets and rename them. Once you see that code, you can figure out how to customize it to your needs.