Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Retain Format When Coping Visible Cells Only to New Worksheet

I have a spreadsheet with around 5000 rows and 100 columns. I hide
rows and columns, do some filtering and subtotaling when creating
different reports. I would like to be able to create a report, then
copy only the visible cells and columns and paste theses to a new
worksheet while maintaining the format. I can't get it to work. It
seems the problem is since I'm not pasting the data to the same
columns the formatting gets all messed up. Format Painter doesn't
help. I have a macro that deletes all hidden rows and columns and it
does maintain the formatting but it's too slow. Does anyone know of
a way to do copy Visible Cells Only while maintaining the same format?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Retain Format When Coping Visible Cells Only to New Worksheet

I put some test data in a worksheet, I applied data|filter autofilter, I added
data|subtotals, I formatted a few cells (fill/font/bold).

I hid some columns. I hid some rows using the outlining symbol to the left.

I selected the range to copy.
I hit Edit|Goto|Special|Visible cells only

I pasted to a new sheet and both the values and formatting were pasted.

The columnwidth's weren't pasted, though. But if you're using xl2k+, you could
do edit|paste special|columnwidths to get that.

I used xl2003 in my test. Does this work differently for you?

If so, what version of excel are you using?

Ronster wrote:

I have a spreadsheet with around 5000 rows and 100 columns. I hide
rows and columns, do some filtering and subtotaling when creating
different reports. I would like to be able to create a report, then
copy only the visible cells and columns and paste theses to a new
worksheet while maintaining the format. I can't get it to work. It
seems the problem is since I'm not pasting the data to the same
columns the formatting gets all messed up. Format Painter doesn't
help. I have a macro that deletes all hidden rows and columns and it
does maintain the formatting but it's too slow. Does anyone know of
a way to do copy Visible Cells Only while maintaining the same format?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Retain Format When Coping Visible Cells Only to New Worksheet

I'm using xl2K and it doesn't work the same as yours. When I copy
Visible Cells Only and paste them to a new WS ALL the columns and rows
are the same and about 1/3 of the data is unreadable (requires
resizing). I tried the edit|paste special|columnwidths but when
pasting I get an error message saying the areas aren't the same size.
It looks like it's time to upgrade to 2003 or use my slow delete hidden
rows/columns macro.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Retain Format When Coping Visible Cells Only to New Worksheet

Or just copy the columnwidths separately--or select the whole column(s) first
(untested).

Ronster wrote:

I'm using xl2K and it doesn't work the same as yours. When I copy
Visible Cells Only and paste them to a new WS ALL the columns and rows
are the same and about 1/3 of the data is unreadable (requires
resizing). I tried the edit|paste special|columnwidths but when
pasting I get an error message saying the areas aren't the same size.
It looks like it's time to upgrade to 2003 or use my slow delete hidden
rows/columns macro.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Retain Format When Coping Visible Cells Only to New Worksheet

The Paste Special ColumnWidths worked! First I create the report with
all the hidden rows and columns with the formatting just the way I want
it. I then create a new worksheet. After that I do the Edit, GoTo,
Special, Visible Cells Only. I then switch to the new WS, location A1.
I do the Paste Special Column Widths which reformats ALL the columns
to the same size as the origianl. I then simple do a Paste which
inserts all the visible data and any colored cells or other formatting
that the other WS had. Works great! Thanks



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Retain Format When Coping Visible Cells Only to New Worksheet

Glad you got it working.

Ronster wrote:

The Paste Special ColumnWidths worked! First I create the report with
all the hidden rows and columns with the formatting just the way I want
it. I then create a new worksheet. After that I do the Edit, GoTo,
Special, Visible Cells Only. I then switch to the new WS, location A1.
I do the Paste Special Column Widths which reformats ALL the columns
to the same size as the origianl. I then simple do a Paste which
inserts all the visible data and any colored cells or other formatting
that the other WS had. Works great! Thanks


--

Dave Peterson
Reply
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
URGENT! Retain format of cells in pivot table upon refresh KDG Excel Discussion (Misc queries) 3 September 10th 07 10:02 AM
How can I format cells to be visible onscreen but not print out? ET Excel Discussion (Misc queries) 1 June 8th 07 01:01 PM
Macro for coping cells from one worksheet to another ShahAFFS Excel Programming 3 August 31st 05 11:28 AM
Trouble Coping Visible Cells JenYancey Excel Discussion (Misc queries) 2 May 25th 05 12:17 AM
Retain cell format while linking cells Josh[_8_] Excel Programming 4 January 29th 04 09:51 PM


All times are GMT +1. The time now is 12:35 AM.

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

About Us

"It's about Microsoft Excel"