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: 13

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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,213,546
Messages
6,114,254
Members
448,556
Latest member
peterhess2002

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