extracting data

deedee88

Board Regular
Joined
Jan 17, 2009
Messages
98
Hi

I have a workbook of departments in one column and the actual spent by month going accross the columns.

I would like a macro to extract each of the department information into a separate workbook.

Any help will be greatly appreciated.


Thank you,
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
you can try like this
Code:
For Each r In Sheets("sheet1").UsedRange.Rows
        Set nwb = Workbooks.Add
        r.Copy nwb.Sheets(1).Range("a1")
        nwb.SaveAs somepath & r.Range("a1")
        nwb.Close
Next
 
Upvote 0
Thanks for the reply, but I am not too familiar with VBA coding.

Could you please explain in more detail?

Thank you!
 
Upvote 0
try the code on a sample workkbook with a small amount of data
change sheetname as reqd, and give somepath a value,where to save the files, ending in \
the code works through each row, adds a new workbook copies the row and saves the workbook with the name in col A
 
Upvote 0

Forum statistics

Threads
1,207,089
Messages
6,076,517
Members
446,211
Latest member
b306750

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top