Hello - I have a macro code that searches through column H of a file, finds duplicates, and bolds them. The problem is I only want it to bold the column if the duplicate is located above it, not anywhere in the workbook
If the macro could be designed to bold duplicate rows based on a unique identifier in column E then that would also work. In other words, if column H matches and column E matches then bold the duplicate
This is the code I have now
Sub MultipleBillStop()
Dim x As Long, LastRow As Long
'Removes all duplicate route ID's in the hook data sheet
Sheets("Master").Select
LastRow = Range("H65536").End(xlUp).Row
For x = LastRow To 1 Step -1
If Application.WorksheetFunction.CountIf(Range("H1:H" & LastRow), Range("H" & x).Text) > 1 Then
If Application.WorksheetFunction.CountIf(Range("H" & x + 1 & ":H" & LastRow + 1), Range("H" & x).Text) > 0 Then
Range("H" & x).EntireRow.Font.Bold = True
End If
End If
Next x
End Sub
If the macro could be designed to bold duplicate rows based on a unique identifier in column E then that would also work. In other words, if column H matches and column E matches then bold the duplicate
This is the code I have now
Sub MultipleBillStop()
Dim x As Long, LastRow As Long
'Removes all duplicate route ID's in the hook data sheet
Sheets("Master").Select
LastRow = Range("H65536").End(xlUp).Row
For x = LastRow To 1 Step -1
If Application.WorksheetFunction.CountIf(Range("H1:H" & LastRow), Range("H" & x).Text) > 1 Then
If Application.WorksheetFunction.CountIf(Range("H" & x + 1 & ":H" & LastRow + 1), Range("H" & x).Text) > 0 Then
Range("H" & x).EntireRow.Font.Bold = True
End If
End If
Next x
End Sub