Hi ALHASAN
This Code in the attached assumes CASH LEDGER is the First Tab in the Workbook and that INQUIRY END OF DAY is the second Tab of the Workbook.
The Code merely flags the exceptions.
Option Explicit
Sub Compare()
Dim ws As Worksheet, ws1 As Worksheet
Dim LR As Long, LR1 As Long
Dim Rng As Range, Rng1 As Range, cel As Range, cel1 As Range, c As Range
Set ws = Sheets(1)
Set ws1 = Sheets(2)
With ws
.Range("G:G").ClearContents
LR = .Cells.Find("*", .Cells(.Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
For Each cel In .Range("G2:G" & LR)
cel.Value = .Cells(cel.Row, "A").Value & .Cells(cel.Row, "B").Value & .Cells(cel.Row, "C").Value & .Cells(cel.Row, "D").Value
Next cel
Set Rng = .Range("G2:G" & LR)
End With
With ws1
.Range("G:G").ClearContents
LR1 = .Cells.Find("*", .Cells(.Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
For Each cel1 In .Range("G2:G" & LR1)
cel1.Value = .Cells(cel1.Row, "A").Value & .Cells(cel1.Row, "C").Value & .Cells(cel1.Row, "B").Value & .Cells(cel1.Row, "D").Value
Next cel1
Set Rng1 = .Range("G2:G" & LR1)
End With
For Each cel In Rng
Set c = Rng1.Find(cel.Value, LookIn:=xlValues)
If Not c Is Nothing Then
Else
cel.Offset(0, -1).Value = "EXCEPTION"
End If
Next cel
With ws
.Range("G:G").ClearContents
End With
With ws1
.Range("G:G").ClearContents
End With
End Sub
Bookmarks