abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,429
- Office Version
- 2019
- 2010
- Platform
- Windows
hi
in earlier i got this code from mr.Fluff i appreciate that
i'd just like amend the code i want when the autofilter and copy data from sheet to another and when i search a new data should copy a new data under the old data consecutively and if i repeat the data already is existed then overwrite the old data
thanks advance
in earlier i got this code from mr.Fluff i appreciate that
i'd just like amend the code i want when the autofilter and copy data from sheet to another and when i search a new data should copy a new data under the old data consecutively and if i repeat the data already is existed then overwrite the old data
VBA Code:
Sub CopyFiltered()
Dim src As Worksheet
Dim tgt As Worksheet
Set src = ThisWorkbook.Sheets("DATA")
Set tgt = ThisWorkbook.Sheets("Sheet2")
src.AutoFilter.Range.Offset(1, 2).Resize(, 5).Copy tgt.Range("B6")
End Sub
thanks advance