![]() |
Creating several smaller worksheets from a 'master sheet'
I need some help and am a bit overwhelmed at the task I've tried to
figure out. I can think of some of the basic tools that I need (variable for the column A value, loop for the copy/paste protocol) but I am very very new to the VB world and I can't figure it out. Any help would be greatly appreciated! Basically, I need to take a 'master sheet' and copy/paste the information from this large sheet into several smaller sheets in a new workbook.Below is a pretty good description of what I'm trying to do. 'Master sheet' has values for Columns A thru G and the number of Rows varies. Row 1 is the header row, and Column A values are the names of the 'owner' of the accounts. Each 'owner' needs their own sheet with their accounts listed First, all new spreadsheets need to be created in a new Workbook. Row 1 of 'master sheet' is to be placed at Row 1 of each new Sheet in the new Workbook in Bold Font. The value of cell A2 in 'master sheet' will be the name of the first Sheet in new the new Workbook.Going row by row, copy the range of cells from Column A thru Column G into the new Sheet until you reach a new value in column A in 'master sheet'. Once you reach a new value in Column A in 'master sheet', start a new Sheet in the same new Workbook with the new sheet named after the new value found in Column A of 'master sheet'. Repeat the same row-by-row copy and paste steps until you find a new value in Column A of 'master sheet'. Repeat until there are no more values for Column A in Active Sheet. |
Creating several smaller worksheets from a 'master sheet'
Have a look at the code from Ron de Bruin's site.
Copy records with the same value in a column to a new sheet or workbook (normal data range) http://www.rondebruin.nl/copy5.htm Gord Dibben MS Excel MVP On Mon, 31 Aug 2009 14:47:30 -0700 (PDT), Matthew Dyer wrote: I need some help and am a bit overwhelmed at the task I've tried to figure out. I can think of some of the basic tools that I need (variable for the column A value, loop for the copy/paste protocol) but I am very very new to the VB world and I can't figure it out. Any help would be greatly appreciated! Basically, I need to take a 'master sheet' and copy/paste the information from this large sheet into several smaller sheets in a new workbook.Below is a pretty good description of what I'm trying to do. 'Master sheet' has values for Columns A thru G and the number of Rows varies. Row 1 is the header row, and Column A values are the names of the 'owner' of the accounts. Each 'owner' needs their own sheet with their accounts listed First, all new spreadsheets need to be created in a new Workbook. Row 1 of 'master sheet' is to be placed at Row 1 of each new Sheet in the new Workbook in Bold Font. The value of cell A2 in 'master sheet' will be the name of the first Sheet in new the new Workbook.Going row by row, copy the range of cells from Column A thru Column G into the new Sheet until you reach a new value in column A in 'master sheet'. Once you reach a new value in Column A in 'master sheet', start a new Sheet in the same new Workbook with the new sheet named after the new value found in Column A of 'master sheet'. Repeat the same row-by-row copy and paste steps until you find a new value in Column A of 'master sheet'. Repeat until there are no more values for Column A in Active Sheet. |
Creating several smaller worksheets from a 'master sheet'
Thanks! This is incredibly helpful and does what I need it to do but
it looks more complicated than it needed to be with error correction and whatnot... How would I go about simplifying it? |
Creating several smaller worksheets from a 'master sheet'
Hi Matthew
Short code is not always good code (I not say my code is good <g) What do you want easier ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Matthew Dyer" wrote in message ... Thanks! This is incredibly helpful and does what I need it to do but it looks more complicated than it needed to be with error correction and whatnot... How would I go about simplifying it? |
All times are GMT +1. The time now is 01:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com