Macro to copy/paste in new location from a filtered list?

sabbathstevie

New Member
Joined
Mar 17, 2010
Messages
8
Morning all,

Can anyone help me with this one:

I need a macro to look at a list (which has been previosly filtered by the same macro) and copy certain columns in that list to be pasted into another workbook. The problem is, the length of the list will change frequently depending on the filter criteria. I am currently a "macro recorder", so knowledge of code is limited - I'll probably record a macro copying just the absolute cells and then edit it with any code suggestions made.

Many thanks,
Stevie
 
Last edited:

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi
assuming you have filtered your data, try the following codes. change the column alphabets to be copied, destination book name and sheetname to your requirements.
Code:
Sub stevie()
Dim a As Long, x As Long
Dim b As String
x = Cells(Rows.Count, 1).End(xlUp).Row
    For a = 1 To 6
    b = Choose(a, "A", "C", "E", "F", "T", "P")
    Range(b & 2 & ":" & b & x).Copy
    Workbooks("MASTER.xls").Worksheets("2010").Range(Chr(H + 64) & 2).PasteSpecial
    Next a
MsgBox "Complete"
End Sub
Ravi
 
Upvote 0

Forum statistics

Threads
1,216,462
Messages
6,130,781
Members
449,591
Latest member
sharmavishnu413

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