Hi guys,
I would like to copy two columns U and H from filtered table GMCR_tbl and paste them into columns A and B of an empty table ECP_tbl. I would only like the visible cells. Could someone help me add this final step to my code?
Thank you!
I would like to copy two columns U and H from filtered table GMCR_tbl and paste them into columns A and B of an empty table ECP_tbl. I would only like the visible cells. Could someone help me add this final step to my code?
Thank you!
HTML:
Public Sub ECP()
Dim lastRow As Long
'delete previous data
Worksheets("ECP & MMF").ListObjects("ECP_tbl").DataBodyRange.ClearContents
Worksheets("GMCR Extract").AutoFilterMode = False
'remove all existing filters
Worksheets("GMCR Extract").ListObjects("GMCR_tbl").Range.AutoFilter Field:=21, Criteria1:= _
"<>"
lastRow = Worksheets("GMCR Extract").Range("A" & Worksheets("GMCR Extract").Rows.Count).End(xlUp).Row