How to copy cell value from sheet2 and paste into sheet1 of specific column?

Hello experts !
The secnerio is:
There are 2 sheet in attached Excel file i.e. Sheet1 & Sheet2. I need to iterate through each sheet.
Rule: If there are multiple row items in sheet2, enter the multiple Doc number in the single cell of Sheet1 “Doc Number” header against the matching combination of “Name & Country”. Sperate them with " / "

Sample file is Attached Here.
Sample.xlsx (10.7 KB)

ScreenShot : My requirement

Your condition is to only compare with name or name and country both in Sheet2?

Hi @Prabin_Chand,

I am sharing a simple solution for you. I hope it helps.

simpleExample.xaml (9.6 KB)


name & country Both

As per your input file sheet2 Name Alex does not matching with Country US as it has Blank cell.

yeah but Alex & U.S. was just above the blank cell

Sir, the output is not valid.
You’re working with “My requirement Example” Sheet. I just kept that “My requiirement Example” sheet for reference only but you are working with that sheet.

My requirement is to compare sheet2 with sheet1 (again “My requirement Example” sheet is just for reference.) and if(condition 1st) the name & country matched copy cell value in sheet1 “DocNumber” header. Again if(condition 2nd) the Name is equivalent to Sheet1 name but Country cell is empty then need to copy “DocNumber” cell value from sheet2 and place it in sheet on “DocNumber” header seperate them with " / ".

For example: 1234785 / 9632145


Please refer to the screenshot(for my requirement) i have attached in my TOPIC.