Hi I am trying to copy any cells that are in yellow in Column B From Activesheet and paste it to another Workbook called "Mapping Table" to Lastrow.cells in column A. As I have a list of names on the Mapping Table workbook and need to add it in Column A to last entry.
Came across this and need a little help getting it to work thanks.
Came across this and need a little help getting it to work thanks.
Code:
Sub Yellow()
Dim LR As Long, i As Long,LastRow
LR = Range("B" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With Range("B" & i)
If .Interior.ColorIndex = 6 Then
.Copy Destination:= '<--- Need this to paste to workbook called "Mapping Table" which there is only one tab sheets(1)
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End If
End With
Next i
End Sub
Last edited: