HI Jindon. Sorry i have been going a little around in these codes. You code is really great. I just have 2 wishes. If i want it to display if the difference is minus or plus, what do i change in the code? So it dont remove the minus, but display it instead
And also can you build these function into your code. I have this code below i use.
SIncerely
Abjac
Sub jindon()
With Cells(1).CurrentRegion.Columns("k")
.Offset(1).Resize(.Rows.Count - 1).Formula = _
"=if(rc[-1]<>rc[-2],abs(rc[-1]-rc[-2]),"""")"
End With
Call ColorNonDuplicates10
End Sub
Sub ColorNonDuplicates10()
Sheets("Final Match").Activate
Dim i As Long
Dim strCol1 As String
Dim strCol2 As String
strCol1 = "I"
strCol2 = "J"
For i = 2 To Range(strCol1 & "65536").End(xlUp).Row
If Range(strCol1 & i).Value <> Range(strCol2 & i).Value Then
Range("Z" & i).Formula = "X"
With Range(strCol1 & i).Font
.ColorIndex = 3
.Bold = True
End With
With Range(strCol2 & i).Font
.ColorIndex = 3
.Bold = True
End With
End If
Next i
Cells.Select
Selection.Sort Key1:=Range("Z2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("Z:Z").Delete
End Sub
Bookmarks