rpaulson
Well-known Member
- Joined
- Oct 4, 2007
- Messages
- 1,417
see code below,
it works as needed.
just like to add a small tweak.
my table has 6 fields,
current code below will copy all 6 (Coumns A~F)
what is the most efficient way to exclude first 2 columns, as i only need columns (C~F)
thanks for looking,
Ross
it works as needed.
just like to add a small tweak.
my table has 6 fields,
current code below will copy all 6 (Coumns A~F)
what is the most efficient way to exclude first 2 columns, as i only need columns (C~F)
VBA Code:
Dim lo As ListObject
Set lo = Worksheets("InvoiceDetail").ListObjects("Invoice_Detail")
lo.Range.AutoFilter Field:=1, Criteria1:=[D2] 'filter field1 by value in cell D2
lo.DataBodyRange.SpecialCells(xlCellTypeVisible).Copy
[S11].PasteSpecial Paste:=xlPasteValues
......
thanks for looking,
Ross