LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Macro to copy only used cells

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 **
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a macro to copy cells pcor New Users to Excel 4 May 4th 09 04:24 AM
macro needed to copy blocks of cells across to list of cells down piersonpro Excel Programming 3 March 28th 07 12:51 PM
Using a macro to copy certain cells fullers Excel Programming 0 September 15th 05 04:08 PM
copy cells with a macro... John Keith[_2_] Excel Programming 6 March 11th 05 08:20 PM
a script/macro to copy a block of cells next to specified cells z.entropic[_2_] Excel Programming 8 November 14th 03 03:17 PM


All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"