Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Problem With this macro table

Sub Macro1()

Dim wshO As Worksheet, rgO As Range '(O)rigin sheet and range
Dim wshD As Worksheet, rgD As Range '(D)estination sheet and range
Set wshO = ThisWorkbook.Worksheets("Murk 11A") 'origin sheet
Set rgO = wshO.Range("A1:038") 'origin range
Set wshD = ThisWorkbook.Worksheets("Murk 11A") 'dest sheet
'Find last cell on dest range using column A.
'--- Copy Murk 11A!A1:O38 at end of data in "Murk 11A" ---


Set wshO = ThisWorkbook.Worksheets("T+M") 'origin sheet
Set rgO = wshO.Range("A1:w89") 'origin range
Set wshD = ThisWorkbook.Worksheets("T+M") 'dest sheet
'Find last cell on dest range using column A.
'--- Copy T+M!A1:W89 at end of data in "T+M" ---


Set wshO = ThisWorkbook.Worksheets("Murk 12C") 'origin sheet
Set rgO = wshO.Range("A1:Q41") 'origin range
Set wshD = ThisWorkbook.Worksheets("Murk 12C") 'dest sheet
'Find last cell on dest range using column A.
'--- Copy T+M!A1:Q41 at end of data in "Murk 12C" ---

Set rgD = wshO.Columns(1).Cells(wshO.Columns(1).Cells.Count) 'last cell
in col A: A65536.
Set rgD = rgD.End(xlUp).Offset(1, 0) 'last cell of data in A then 1 row
bellow.

'Now copy/paste
rgO.Copy rgD 'Syntax: OriginRange.Copy DestinationRange

'--- repeat above section ---
End Sub

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
Excel 2007 Macro specific table to generic table? Sue Excel Discussion (Misc queries) 3 June 1st 08 06:12 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Pivot Table in Excel 2007 : Problem with % in Table spudsnruf Excel Discussion (Misc queries) 2 January 9th 08 09:53 PM
Steps from Macro recorder for Pivot table will not run as a Macro Nancy[_5_] Excel Programming 0 April 2nd 04 10:33 PM


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