Copy table Column data using a Macro

sg1990

New Member
Joined
May 26, 2016
Messages
6
Is anyone able to assist in copying a the data of a table column only. I have a macro which runs a bunch of filters and from there I would like to copy and paste the column data only (no headers)

I specifically need help with copying and pasting the data.

Code:
Sub CopyData()
   
      With Sheets("Sheet1")
      
      ThisWorkbook.Worksheets("Sheet1").ListObjects("Table1").Range.AutoFilter Field:=3, Criteria1:="Test"
      
      Set Rng = .Range("A1:A") & .Range("A" & .Rows.Count).End(xlup).Row).SpecialCells(xlCellTypeVisible)
      Rng.Copy Sheets("Sheet2").Cells(1, 1)
      
      End With


End Sub
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Just column A? Can't you just record the macro that starts at A2 and goes down via Ctrl+Shift+Down, Copy, and Paste to where you want it to go?
 
Upvote 0
Just column A? Can't you just record the macro that starts at A2 and goes down via Ctrl+Shift+Down, Copy, and Paste to where you want it to go?

Unfortunately, that will not work as the record in A2 might be filtered. I need to do it as range that selects down and copy that selection to my desired target.
 
Upvote 0

Forum statistics

Threads
1,215,529
Messages
6,125,345
Members
449,220
Latest member
Edwin_SVRZ

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