LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
HJ HJ is offline
external usenet poster
 
Posts: 28
Default Paste as values in macro

With a few minor modifications on my part, the following macro was provided
to me by Tom Ogilvy and Ron de Bruin (thanks again, worked great until I
ventured off onto my own!). Doesn't it figure that with my minor
modifications, when I run the macro I get #REF errors?

The current macro is as follows:

Sub CopyClosingData()
Dim i As Long, rng As Range, sh As Worksheet
Worksheets.Add(After:=Worksheets( _
Worksheets.Count)).Name = "ClosingData"
Set sh = Worksheets("Input - Closings")
i = 12
Do While Not IsEmpty(sh.Cells(i, 1))
Set rng = Union(sh.Cells(i, 1), _
sh.Cells(i + 1, 1).Resize(2, 1))
rng.EntireRow.Copy Destination:= _
Worksheets("ClosingData").Cells(Rows.Count, 1).End(xlUp)(2)
i = i + 12
Loop
End Sub

The spreadsheet I am copying from has a lot of links and formulas in it and
I was wondering if the #REF errors I am getting are because I need to copy
and paste values? I've tried and failed to come up with the correct code to
add to test this and was wondering if anyone could guide me with the code
needed to see if that is the issue.

TIA.
HJ
 
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: Paste Values Jennifer Excel Discussion (Misc queries) 4 July 14th 08 06:07 PM
Paste values - macro yshridhar Excel Discussion (Misc queries) 4 March 25th 08 06:36 AM
A macro to paste values Matthew Excel Discussion (Misc queries) 2 September 17th 07 10:25 AM
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 01:57 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"