freerskys
New Member
- Joined
- Jul 24, 2014
- Messages
- 29
- Office Version
- 2010
- Platform
- Windows
I am trying to highlight an entire row. If a cell in Sheet 2 column A,
Matches a cell in Sheet 1 column A, highlight Sheet 2 entire row, matched in column A.
I appreciate any help.
This works for something else that I need, I would like to add the highlight part with this code.
Sub WardCopyPaste()
Dim Fnd As Range, Cl As Range
With Sheets("sheet1")
For Each Cl In .Range("A1", .Range("A" & Rows.Count).End(xlUp))
Set Fnd = Sheets("Sheet2").Columns("A:A").Find(Cl.Value, , xlFormulas, xlWhole, xlByRows, xlNext, False, , False)
If Not Fnd Is Nothing Then If Cl.Offset(, 6).Value = 0 Then Cl.Offset(, 6).Value = Fnd.Offset(, 6).Value
Next Cl
End With
End Sub
Matches a cell in Sheet 1 column A, highlight Sheet 2 entire row, matched in column A.
I appreciate any help.
This works for something else that I need, I would like to add the highlight part with this code.
Sub WardCopyPaste()
Dim Fnd As Range, Cl As Range
With Sheets("sheet1")
For Each Cl In .Range("A1", .Range("A" & Rows.Count).End(xlUp))
Set Fnd = Sheets("Sheet2").Columns("A:A").Find(Cl.Value, , xlFormulas, xlWhole, xlByRows, xlNext, False, , False)
If Not Fnd Is Nothing Then If Cl.Offset(, 6).Value = 0 Then Cl.Offset(, 6).Value = Fnd.Offset(, 6).Value
Next Cl
End With
End Sub