Copy and Append pivot table range

mssbass

Active Member
Joined
Nov 14, 2002
Messages
253
Platform
  1. Windows
Right now I have a pivot table where I have 4 modules that select each column of the pivot and append to a specific column in another worksheet. Is there a way I can do this in 1 module?

Sub CopyAppend()

Application.Goto (ActiveWorkbook.Sheets("ZMROSALES MAP").Range("a1"))

ActiveSheet.PivotTables("PivotTodaysOpenHolds2").PivotSelect "Notification[All]", _
xlLabelOnly, True
Selection.Copy
Application.Goto (ActiveWorkbook.Sheets("NotifTasks").Range("b3"))

Selection.End(xlDown).Select

intNewRow = Application.ActiveCell.Row + 1
strNewCell = "b" & intNewRow
Application.Range(strNewCell).Activate

ActiveSheet.Paste



End Sub

Sub CopyAppend2()

Application.Goto (ActiveWorkbook.Sheets("ZMROSALES MAP").Range("a1"))

ActiveSheet.PivotTables("PivotTodaysOpenHolds2").PivotSelect "Hold Code[All]", _
xlLabelOnly, True
Selection.Copy
Application.Goto (ActiveWorkbook.Sheets("NotifTasks").Range("c3"))

Selection.End(xlDown).Select

intNewRow = Application.ActiveCell.Row + 1
strNewCell = "c" & intNewRow
Application.Range(strNewCell).Activate

ActiveSheet.Paste



End Sub
Sub CopyAppend3()

Application.Goto (ActiveWorkbook.Sheets("ZMROSALES MAP").Range("a1"))

ActiveSheet.PivotTables("PivotTodaysOpenHolds2").PivotSelect "Hold Text[All]", _
xlLabelOnly, True
Selection.Copy
Application.Goto (ActiveWorkbook.Sheets("NotifTasks").Range("f3"))

Selection.End(xlDown).Select

intNewRow = Application.ActiveCell.Row + 1
strNewCell = "f" & intNewRow
Application.Range(strNewCell).Activate

ActiveSheet.Paste



End Sub

Sub CopyAppend4()

Application.Goto (ActiveWorkbook.Sheets("ZMROSALES MAP").Range("a1"))
Worksheets("ZMROSALES MAP").PivotTables("PivotTodaysOpenHolds2").PivotFields("Max of Create Date").DataRange.Select




Selection.Copy
Application.Goto (ActiveWorkbook.Sheets("NotifTasks").Range("j3"))

Selection.End(xlDown).Select

intNewRow = Application.ActiveCell.Row + 1
strNewCell = "j" & intNewRow
Application.Range(strNewCell).Activate

ActiveSheet.Paste



End Sub
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I want to make sure the module doesn't force the code to show that page while it's running also. Screenupdating = false
 
Upvote 0

Forum statistics

Threads
1,215,915
Messages
6,127,699
Members
449,398
Latest member
m_a_advisoryforall

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top