I’m trying to find a match from 2 columns against another 2 columns

LewAvfc93

New Member
Joined
Jan 16, 2020
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
Hi

I want to see if column A+B can find a match against columns D+E

Any help would be appreciated

Thanks
 

Attachments

  • CCDCB6BC-3F71-4734-9299-2FDE94DC8916.jpeg
    CCDCB6BC-3F71-4734-9299-2FDE94DC8916.jpeg
    106.6 KB · Views: 14

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Try this

Code:
Sub t()
Dim c As Range, fn As Range
    For Each c In Range("A2", Cells(Rows.Count, 1).End(xlUp))
        Set fn = Range("D:D").Find(c.Value, , xlValues)
            If Not fn Is Nothing Then
                If Trim(c.Value) & Trim(c.Offset(, 1).Value) = Trim(fn.Value) & Trim(fn.Offset(, 1).Value) Then
                    c.Resize(, 2).Interior.Color = vbYellow
                    fn.Resize(, 2).Interior.Color = vbYellow
                End If
            End If
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top