ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Ron de Bruin's Copy to Worksheets (https://www.excelbanter.com/excel-programming/415132-ron-de-bruins-copy-worksheets.html)

marcia2026

Ron de Bruin's Copy to Worksheets
 
When I run the macro, I get a sheet for each unique value as requested, but I
also get another sheet that requires a name. It seems to be all of the data
on the original sheet. How can I delete this sheet automatically?

Also, is it possible to name the new sheets in such a way that they
reference back the original data? i.e. my unique values are MV, RMS, BE
that is what the macro is naming the new sheets, and that is ok, but it would
be of more help if it were named: MV_"sheet1", RMS_"sheet1" and so on so
that the information on sheet2 would be associated with MV_"sheet2"

Hope that was sorta clear.

Ron de Bruin

Ron de Bruin's Copy to Worksheets
 
Hi Marcia

For others this is the page
http://www.rondebruin.nl/copy5.htm#sheet


When I run the macro, I get a sheet for each unique value as requested, but I
also get another sheet that requires a name. It seems to be all of the data
on the original sheet. How can I delete this sheet automatically?


Diffecult to say
The only time you see this msgbox is that the sheet already exist


be of more help if it were named: MV_"sheet1", RMS_"sheet1" and so on so


Use
WSNew.Name = cell.Value & " " & ws1.Name




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"marcia2026" wrote in message ...
When I run the macro, I get a sheet for each unique value as requested, but I
also get another sheet that requires a name. It seems to be all of the data
on the original sheet. How can I delete this sheet automatically?

Also, is it possible to name the new sheets in such a way that they
reference back the original data? i.e. my unique values are MV, RMS, BE
that is what the macro is naming the new sheets, and that is ok, but it would
be of more help if it were named: MV_"sheet1", RMS_"sheet1" and so on so
that the information on sheet2 would be associated with MV_"sheet2"

Hope that was sorta clear.


marcia2026

Ron de Bruin's Copy to Worksheets
 
RON YOU ARE BRILLIANT!!!! I CAN'T THANK ENOUGH FOR ALL THE HELP YOU HAVE
GIVEN ME. (YES, I AM SHOUTING TO THE ROOFTOPS!!!)

"Ron de Bruin" wrote:

Hi Marcia

For others this is the page
http://www.rondebruin.nl/copy5.htm#sheet


When I run the macro, I get a sheet for each unique value as requested, but I
also get another sheet that requires a name. It seems to be all of the data
on the original sheet. How can I delete this sheet automatically?


Diffecult to say
The only time you see this msgbox is that the sheet already exist


be of more help if it were named: MV_"sheet1", RMS_"sheet1" and so on so


Use
WSNew.Name = cell.Value & " " & ws1.Name




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"marcia2026" wrote in message ...
When I run the macro, I get a sheet for each unique value as requested, but I
also get another sheet that requires a name. It seems to be all of the data
on the original sheet. How can I delete this sheet automatically?

Also, is it possible to name the new sheets in such a way that they
reference back the original data? i.e. my unique values are MV, RMS, BE
that is what the macro is naming the new sheets, and that is ok, but it would
be of more help if it were named: MV_"sheet1", RMS_"sheet1" and so on so
that the information on sheet2 would be associated with MV_"sheet2"

Hope that was sorta clear.




All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com