With the generous help I've been using a macro which checks a range of cells column C, and if any exact matches are found in Column B, then the values in this cell and the adjacent cell (in Column A) are copied/filtered to a new place within the sheet.

What I'd like to know if it is possible to modify this macro so that it matches the last 5 digits of of the values in Column C to those in Column B, and if it finds a match to copy the values in columns A + C to a new place within the worksheet.

A B C
6011292 36395 202-4582623-2072315
61794126 25164 202-5450013-1225164
6011506 68390 026-8638442-4494713
6016213 48365 202-0387539-0048365

Here is the current macro I'm using. If anyone here can help me out it would be greatly appreciated. Thanks

Sub aa()
Dim temp(), tb, tb1 As Variant
Dim x, y, z&
tb = Columns(3).SpecialCells(2)
tb1 = Columns("a:b").SpecialCells(2)

For x = 1 To UBound(tb)
    For y = 1 To UBound(tb1)
    If tb(x, 1) = tb1(y, 2) Then
    z = z + 1
    
    ReDim Preserve temp(1 To z)
    temp(z) = tb1(y, 1) & " " & tb1(y, 2)
    End If
    Next
Next

    With Worksheets("SHEET1").Range("E1")
    For z = 1 To UBound(temp)
        .Cells(z, 1).Resize(, 2) = Split(temp(z), " ")
    Next
    End With
End Sub