Autofilter and copy specific column without heading

CD2017

New Member
Joined
Feb 21, 2017
Messages
33
Hello,

Here is my code to filter Column E, and copy the Data in Column I.

At the moment, I'm copying the header aswell. Can you tell me how I can copy the data in Column I without the heading?

Code:

Sub Financials_Pop_Emails()

With Sheets("mySS Investor Details").Range("A1")

.AutoFilter _
Field:=5, _
Criteria1:=Array("Financials", "Ptnr Cap Stmt"), _
Operator:=xlFilterValues

End With

Sheets("mySS Investor Details").Columns("I").SpecialCells(xlCellTypeVisible).Copy

End Sub


Any help appreciated - thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try:

Code:
Sheets("mySS Investor Details").Columns("I").Offset(1,0).SpecialCells(xlCellTypeVisible).Copy

Regards,

CJ
 
Upvote 0
Ok, try this slightly different method:

Code:
With Sheets("mySS Investor Details")
        With Intersect(.UsedRange, .Columns("I"))
            Set rngVis = .Offset(1, 0).SpecialCells(xlCellTypeVisible)
        End With
End With

rngVis.Copy

Let me know if it still doesn't work.

Regards,

CJ
 
Last edited:
Upvote 0
Works - thank you!

Ok, try this slightly different method:

Code:
With Sheets("mySS Investor Details")
        With Intersect(.UsedRange, .Columns("I"))
            Set rngVis = .Offset(1, 0).SpecialCells(xlCellTypeVisible)
        End With
End With

rngVis.Copy

Let me know if it still doesn't work.

Regards,

CJ
 
Upvote 0
Hi CJ,

One more question on this. Is it possible to concatenate the rngVis with ";" before it's copied?[

The value in rngVis is an email address but I need the semi colon added to the end of it!

Thanks

QUOTE=MrIfOnly;4811029]You're very welcome.

CJ[/QUOTE]
 
Upvote 0
No, because rngVis is actually a range (and should be dimmed as such, BTW). What you could do, after pasting the range to its destination, is loop thru that range and add the semicolon. If this is something you would like help on, please post the code showing where the column of data is being pasted.

Regards,

CJ
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

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