Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default paste values macro

I am bouncing around code for this and overcomplicating it. What code can I
use to paste all values on every sheet for every cell.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default paste values macro

for each sh in Worksheets
sh.UsedRange.Cells.Value = sh.UsedRange.Cells.Value
Next

Merged cells may be problematic (aren't they always) - I haven't tested it
with those.
--
Regards,
Tom Ogilvy


"dogpigfish" wrote in message
...
I am bouncing around code for this and overcomplicating it. What code can

I
use to paste all values on every sheet for every cell.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default paste values macro

Thanks, but I ended up using this. Thanks for pointing me in the right
direction. i was having trouble with the paste values function.

For Each sh In Worksheets
Range("a19:d23").Select
Selection.Copy
Range("a19:d23").Select
Selection.PasteSpecial Paste:=xlPasteValues

Next

End Sub

"Tom Ogilvy" wrote:

for each sh in Worksheets
sh.UsedRange.Cells.Value = sh.UsedRange.Cells.Value
Next

Merged cells may be problematic (aren't they always) - I haven't tested it
with those.
--
Regards,
Tom Ogilvy


"dogpigfish" wrote in message
...
I am bouncing around code for this and overcomplicating it. What code can

I
use to paste all values on every sheet for every cell.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default paste values macro

I think you will be disappointed in the results. Instead, modify it like
this

For Each sh In Worksheets
sh.Activate
Range("a19:d23").Select
Selection.Copy
Range("a19:d23").Select
Selection.PasteSpecial Paste:=xlPasteValues
Next

--
Regards,
Tom Ogilvy


"dogpigfish" wrote in message
...
Thanks, but I ended up using this. Thanks for pointing me in the right
direction. i was having trouble with the paste values function.

For Each sh In Worksheets
Range("a19:d23").Select
Selection.Copy
Range("a19:d23").Select
Selection.PasteSpecial Paste:=xlPasteValues

Next

End Sub

"Tom Ogilvy" wrote:

for each sh in Worksheets
sh.UsedRange.Cells.Value = sh.UsedRange.Cells.Value
Next

Merged cells may be problematic (aren't they always) - I haven't tested

it
with those.
--
Regards,
Tom Ogilvy


"dogpigfish" wrote in message
...
I am bouncing around code for this and overcomplicating it. What code

can
I
use to paste all values on every sheet for every cell.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default paste values macro

This was the final code in case anyone was interested. Again, thanks for
your help and direction, Tom.

For Each sh In Worksheets
sh.Activate
sh.Range("a19:d23").Select
Selection.Copy
sh.Range("a19:d23").Select
Selection.PasteSpecial Paste:=xlPasteValues
Next


"Tom Ogilvy" wrote:

I think you will be disappointed in the results. Instead, modify it like
this

For Each sh In Worksheets
sh.Activate
Range("a19:d23").Select
Selection.Copy
Range("a19:d23").Select
Selection.PasteSpecial Paste:=xlPasteValues
Next

--
Regards,
Tom Ogilvy


"dogpigfish" wrote in message
...
Thanks, but I ended up using this. Thanks for pointing me in the right
direction. i was having trouble with the paste values function.

For Each sh In Worksheets
Range("a19:d23").Select
Selection.Copy
Range("a19:d23").Select
Selection.PasteSpecial Paste:=xlPasteValues

Next

End Sub

"Tom Ogilvy" wrote:

for each sh in Worksheets
sh.UsedRange.Cells.Value = sh.UsedRange.Cells.Value
Next

Merged cells may be problematic (aren't they always) - I haven't tested

it
with those.
--
Regards,
Tom Ogilvy


"dogpigfish" wrote in message
...
I am bouncing around code for this and overcomplicating it. What code

can
I
use to paste all values on every sheet for every cell.






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
Macro to Cut and paste Values tr Excel Discussion (Misc queries) 2 May 25th 10 09:58 PM
A macro to paste values Matthew Excel Discussion (Misc queries) 2 September 17th 07 10:25 AM
Paste Values Macro John Calder New Users to Excel 4 May 28th 07 10:19 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 09:07 PM.

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"