Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Simple yet...Copy formatting (including column/row dimensions) and values but not formulas

This may sound nuts but I cannot find a thread that states how to
select an entire sheet and copy it to a second work book but without
formulas.
Goal?
I have a sheet with hundreds of array formulas that is simply a report
that needn't be dynamically updated over the course of a day.
I want this sheet to make a "values" copy of itself everytime it
launches.
Then I can use it as source without massive recalcs slowing things
down.

So far I have:
Application.Calculation = xlCalculationManual
' Range("A1").CurrentRegion.Copy --only copies A1, no good
' Range("A1:IV9999").Copy --copies that whole range but when formats
paste it does cell formatting but the widths and heights of cols/rows
are not transmitted.
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
ActiveWorkbook.SaveAs ("ALL SALES VALUES")

A way to mimic ctr-A,ctr-A (select ALL) in vba is what I seem to
missing.

Any help would be great.
thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Simple yet...Copy formatting (including column/row dimensions) and values but not formulas

the only way i've been able to do this is to copy & paste it once, with
all formats & formulas, and then paste a 2nd time, with values only.
in a macro, i wouldn't think this would add tons of time - you don't
have to re-select or re-copy the data, just paste, then
pastespecial:=xlvalues.
hope it helps! somebody else may have a better idea.
susan


Finny wrote:
This may sound nuts but I cannot find a thread that states how to
select an entire sheet and copy it to a second work book but without
formulas.
Goal?
I have a sheet with hundreds of array formulas that is simply a report
that needn't be dynamically updated over the course of a day.
I want this sheet to make a "values" copy of itself everytime it
launches.
Then I can use it as source without massive recalcs slowing things
down.

So far I have:
Application.Calculation = xlCalculationManual
' Range("A1").CurrentRegion.Copy --only copies A1, no good
' Range("A1:IV9999").Copy --copies that whole range but when formats
paste it does cell formatting but the widths and heights of cols/rows
are not transmitted.
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
ActiveWorkbook.SaveAs ("ALL SALES VALUES")

A way to mimic ctr-A,ctr-A (select ALL) in vba is what I seem to
missing.

Any help would be great.
thanks


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
Copy an excel sheet from one file to another including formulas Nicolas Heyer Excel Discussion (Misc queries) 4 July 22nd 09 10:36 AM
Copy (Formulas and Formatting ONLY) no values to other rows Kenny Excel Discussion (Misc queries) 1 July 27th 08 08:06 PM
Office XP - Excel 2002; Column formatting & Formulas Do Not Copy Harv Excel Worksheet Functions 1 March 6th 08 11:29 PM
Copy and paste values, formatting and formulas Joe M. Excel Discussion (Misc queries) 2 February 29th 08 09:38 PM
selectin all the values in a column including null values Purnima Sharma Excel Programming 2 November 14th 05 04:24 PM


All times are GMT +1. The time now is 06:22 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"