View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Wullie Wullie is offline
external usenet poster
 
Posts: 13
Default Macro to copy only used cells

I have a macro which does the same work as yours (on a smaller scale) and it
works no problem (creating small files). Can you post your code so I can see
how it compares to mine?

"Rich" wrote:


"Bob Phillips" wrote in message
...
Does each new worksheet therefore contain all of the data for all
branches?

--
__________________________________
HTH

Bob

"Rich" wrote in message
...
Hi, I have a macro which takes one 20000 line weeksheet, containing data
from 300 branches, and copies, pastes and saves to 300 new workbook
containing the data for each branch.

Each branch has a vaying number of lines of data, so my macro filters by
branch code, then copies the whole worksheet, including blank space.

this creates 4mb files, whereas if I manually copy and paste only the
used area of the workbook, it's less than 100k.

I therefore need a macro to highlight only the occupied cells. The number
of columns will always be the same (26), but number of rows varies.

Any ideas how to do this ?

--
Rich
http://www.richdavies.com/excel.htm


** Posted from http://www.teranews.com **




No,

The original worksheet contains 300 branches in 20000 rows.

My macro filters by each branch before copying, pasting and saving.

The new workbooks each contain only one branches data, and are named branch
A, Branch B.

--
Rich
http://www.richdavies.com/excel.htm





** Posted from http://www.teranews.com **