Nuke_It_Newport
New Member
- Joined
- Nov 17, 2020
- Messages
- 47
- Office Version
- 365
- Platform
- Windows
Hi everyone-
I have the following code, that compares sheet "Completed" Column A, cell A5 to the last row with sheet "Import" column A, cell A5 to the last row. It then changes the fill color of cells on sheet "Import" column A, cell A5 to last row for any duplicate values found between the two sheets.
How would I modify this code to do the folowing:
Compare sheet"Completed" Range(A:Q) to sheet "Import" Range(A:Q)
If all the cell values in this range match, then change the fill color on sheet "Import" Range (A:Q) instead of just column A"?
In other words, I want to compare Range(A:Q) instead of just column "A". If the whole row matches, then highlight Range(A:Q) instead of just column "A".
Thanks!
Chad
I have the following code, that compares sheet "Completed" Column A, cell A5 to the last row with sheet "Import" column A, cell A5 to the last row. It then changes the fill color of cells on sheet "Import" column A, cell A5 to last row for any duplicate values found between the two sheets.
VBA Code:
With Sheets("Import")
For Each c In .Range("A5", .Cells(Rows.Count, 1).End(xlUp))
Set fn = Sheets("Completed").Range("A:A").Find(c.Value, , xlValues, xlWhole)
If Not fn Is Nothing Then
adr = fn.Address
c.Interior.Color = RGB(161, 255, 127)
Do
' fn.Interior.Color = RGB(255, 100, 50)
Set fn = Sheets("Completed").Range("A:A").FindNext(fn)
Loop While fn.Address <> adr
End If
Next
End With
How would I modify this code to do the folowing:
Compare sheet"Completed" Range(A:Q) to sheet "Import" Range(A:Q)
If all the cell values in this range match, then change the fill color on sheet "Import" Range (A:Q) instead of just column A"?
In other words, I want to compare Range(A:Q) instead of just column "A". If the whole row matches, then highlight Range(A:Q) instead of just column "A".
Thanks!
Chad