clh_1496
Aug 09, 2023Brass Contributor
VBA to copy row but only those cells in certain columns
Hi,
I've got a line of VBA that looks for the word Check in column E and then copies the rows that match this criteria:
For Each Cell In Workbooks(1).Worksheets("PBS").Range("E:E")
rw = Cell.Row
If Cell.Value = "CHECK" Then
Cell.EntireRow.Copy
Workbooks(1).Worksheets("CHECK").Range("A" & rw).End(xlUp).Offset(1). _
PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
However, what I want to do is only copy the cells in columns A,C:D of each row that contains the word Check in column E?
Kind regards
Charlotte