K
K
Hi all, I have two sheets in workbook. First Sheet names is "Data"
and the second Sheet names is "Template". In Sheet("Data") I have
below data.
A B C D…….col
Record1 LC1 1256 sus
Record1 LC1 1453 suv
Record1 LC1 1566 sut
Record2 LD1 1256 sus
Record2 LD1 1453 suv
Record2 LD1 1566 sut
Record3 LE1 1256 sus
Record3 LE1 1453 suv
Record3 LE1 1566 sut
I need macro on a button in Sheet("Data") which should copy Sheet
("Template") by looking at each unique value in column B of above data
and give the new copied Sheet the unique value name. For example
according to above data macro should copy Sheet("Template") three time
and name them LC1 , LD1 , LE1. While coping Sheet("Template"), macro
should also copy data of column A to D which is in same row of unique
value of column B into unique value sheet. For example
A B C D…….col
Record1 LC1 1256 sus
Record1 LC1 1453 suv
Record1 LC1 1566 sut
Above data should be copied in Sheet("LC1") in range A2
A B C D…….col
Record2 LD1 1256 sus
Record2 LD1 1453 suv
Record2 LD1 1566 sut
Above data should be copied in Sheet("LD1") in range A2
A B C D…….col
Record3 LE1 1256 sus
Record3 LE1 1453 suv
Record3 LE1 1566 sut
Above data should be copied in Sheet("LE1") in range A2
I hope I was able to explain my question. Please can any friend help
me.
and the second Sheet names is "Template". In Sheet("Data") I have
below data.
A B C D…….col
Record1 LC1 1256 sus
Record1 LC1 1453 suv
Record1 LC1 1566 sut
Record2 LD1 1256 sus
Record2 LD1 1453 suv
Record2 LD1 1566 sut
Record3 LE1 1256 sus
Record3 LE1 1453 suv
Record3 LE1 1566 sut
I need macro on a button in Sheet("Data") which should copy Sheet
("Template") by looking at each unique value in column B of above data
and give the new copied Sheet the unique value name. For example
according to above data macro should copy Sheet("Template") three time
and name them LC1 , LD1 , LE1. While coping Sheet("Template"), macro
should also copy data of column A to D which is in same row of unique
value of column B into unique value sheet. For example
A B C D…….col
Record1 LC1 1256 sus
Record1 LC1 1453 suv
Record1 LC1 1566 sut
Above data should be copied in Sheet("LC1") in range A2
A B C D…….col
Record2 LD1 1256 sus
Record2 LD1 1453 suv
Record2 LD1 1566 sut
Above data should be copied in Sheet("LD1") in range A2
A B C D…….col
Record3 LE1 1256 sus
Record3 LE1 1453 suv
Record3 LE1 1566 sut
Above data should be copied in Sheet("LE1") in range A2
I hope I was able to explain my question. Please can any friend help
me.