Dazzawm
Well-known Member
- Joined
- Jan 24, 2011
- Messages
- 3,786
- Office Version
- 365
- Platform
- Windows
I have the code below which looks on sheet 1 and puts on sheet 2 the number in the adjacent column. What do I add to the code that once the data is copied into the cell in sheet 2 it colours the cell yellow so I can idenitfy it? Thanks
Code:
Sub DazzawmsCode()
Dim LR As Long, i As Long, Found As Range
With Sheets("Sheet2")
LR = .Range("AB" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With .Range("AB" & i)
Set Found = Sheets("Sheet1").UsedRange.Find(what:=.Value, LookIn:=xlValues, Lookat:=xlWhole)
If Not Found Is Nothing Then .Offset(, 1).Value = Found.Offset(, 1).Value
End With
Next i
End With
End Sub