Hello,
I need to update the code from the below macro to use 2 sets of criteria opposed to one. Currently it looks at the values in column k, finds off setting values and clears them off my sheet. I need to add in code to look at the values in column L and if it finds a match in column L and off setting values in column K delete them off the rec.
Sub ShowUnmatched()
Dim Amount As Variant
Dim Cell As Range
Dim Data As Variant
'Dim Description As Variant
Dim Found As Range
Dim InvAmount As Variant
Dim Rng As Range
Dim RngEnd As Range
Dim Wks As Worksheet
Set Wks = Worksheets("Rec")
Set Rng = Wks.Range("K9")
Set RngEnd = Wks.Cells(Rows.Count, Rng.Column).End(xlUp)
If RngEnd.Row < Rng.Row Then Exit Sub Else Set Rng = Wks.Range(Rng, RngEnd)
Application.ScreenUpdating = False
For Each Cell In Rng
Amount = Cell.Value
If Amount <> "" Then
InvAmount = Amount * -1
Set Found = Rng.Find(InvAmount, , xlValues, xlWhole, xlByRows, xlNext, False)
If Not Found Is Nothing Then
If Found.Offset(0, 1) = Cell.Offset(0, 1) Then
Cell.EntireRow.ClearContents
Found.EntireRow.ClearContents
End If
End If
End If
Next Cell
For r = Rng.Rows.Count To 1 Step -1
If Rng.Item(r, 1) = "" Then Rng.Rows(r).EntireRow.Delete
Next r
Application.ActiveWindow.ScrollRow = 2
Application.ScreenUpdating = True
End Sub
Any help would be appreciated
Thanks
Bookmarks