VBA Loop if match the 1st criteria, then search and return the partial match value

Faceless Judge

New Member
Joined
Aug 12, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Referring to the attached image, assuming I have two sheets (Report and Raw Data). As you can see, under "Raw Data" sheet, each ID might have multiple customer name and each customer name might have multiple ID. Thus, I wish to first match the ID then lookup and return the value from "Raw Data" sheet to "Report" sheet.

eg. Of "Report" sheet, "A6" is 1000 with "B6" customer name Alex Mayer. But in "Raw Data" sheet, ID 1000 has two different names and the customer name Alex Mayer appear to have two IDs.

Please look at the image attached for clearer picture. Kindly help on the VBA folks. :)
 

Attachments

  • Image 1.PNG
    Image 1.PNG
    21.1 KB · Views: 6

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
So you want both of the names with the matching ID to be returned to the Report worksheet?
Please use XL2BB to post your worksheet data (see last link in reply window). It allows use to easily copy the data you provide into a workbook.
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,925
Members
449,056
Latest member
denissimo

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