excel macro to copy a set range to different worksheets in another workbook and rename the worksheets
Posted on 2013-06-24
I have a set range in workbook A, Worksheet A, Range("A1", "C6").
Whenever there is a change in the range, I would like to copy the new range into workbook B as a new worksheet and then rename the sheet with the cells A2&C4 of the original range.
Example: Range1, cellA2= "10", cellsC4 ="test"
The macro is run and the SheetA.Range("A1", "C6"). Select.Copy
in Workbook B, a new sheet is created with the name 10 test, and the range is pasted into it. (values and formats)
The next time the original range is updated, the cells are now A2= 12 , Cells C4 =420
The macro is run with SheetA.Range("A1", "C6"). Select.Copy
in Workbook B, a new sheet is created with the name 12 420, and the range is pasted into it
So whenever the macro is run, a new worksheet is created in workbook B .
The macro should be run manually, not whenever the range is changed.