Compare two different excel sheets and write matching result in both the sheets

Hi All,
I have 2 Excel sheets data.xlsx & data1.xlsx.

data.xlsx (9.6 KB)

data1.xlsx (10.5 KB)

I am reading for each row from data.xlsx as outer loop and data1.xlsx as inner loop and matching the amount.
If the Amount is matched, I need to update Status1 = Yes (data1.xlsx), Status = Yes (data.xlsx) and copy the Number column value from (data1.xlsx) to New Number Column (data.xlsx) simultaneously.
As per the data, if there are more than 1 matching records, it should pick first matching record.

I tried various methods but could not get the solution. Any help or xaml would be highly appreciated.

Hi @Zahid1 !
Here is a suggestion: Matching_sheets.xaml (11.1 KB)
Does it work as expected ?
If you have questions on the way I put the activities I can detail more

@Hiba_B : Thank you so much. It worked as expected. Just added 1 more condition to avoid duplication and it worked great. Thanks again

1 Like

Hi @Hiba_B !
The data.xlsx sheet go changed and now we have multiple tabs. I tried using Get Workbook Sheets and For Each; I am able to write in first tab but for 2nd tab, I am getting error -

“WorkbookApplication { CurrentWorkbook=[System.__ComObject],
CurrentWorksheet=null, Visible=!,
WorkbookAbnormallyClosed=! }”

Could you please look into this.

data.xlsx (11.1 KB)

data1.xlsx sheet is the same. Going forward there could be several tabs.

Hey you can use my activity

Hi @Zahid1 !
Here is an evolution of the wanted workflow: Matching_sheets.xaml (14.5 KB)
But as I don’t know what is the condition you added to avoid duplication, don’t forget to add it in the sent WF :wink:

@Hiba_B - Thank you so much. It’s working great !!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.