Creating Multiple Spreadsheets From One Using VBA

S

Sheldon

I have a master spreadsheet which I'll call MASTER1 which has a header
row, nine rows total. In rows 2 - 9, column C has the name of a NY
city. Column C has already been sorted. As an example, cell C2 has
the value of "Albany", as well as cells C3 and C4. Cells C5 - C9 have
the value of "Buffalo". I want to start my VBA program by reading
C2. When I read the value of "Albany", I'd like to immediately write
out the header row and row 2 (all columns) to a new spreadsheet named
Albany.xls WHILE REMAINING IN MASTER1.xls. The program would then
move to cell C3, read "Albany" and write (pipe?) out another record to
Albany.xls. I would do the same when I read C4. Now once I read C5
and read its value of "Buffalo", I would then want to close Albany.xls
and create Buffalo.xls and repeat the same process - write out the
header row, and rows 5-9 (all columns), all of which contain "Buffalo"
in C5-C9 respectively. Any suggestions or assistance would be greatly
appreciated. I did search this forum but could not find something
like this.
Sheldon Potolsky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top