Compare two excell sheet

Description

i have two column excell 1 and excell 2…excell 1 column have many string also excell 2 column have many string…i want to compare to take specific one string.
example:
Excell 1 column : 2194-909-0, PATUAKHALI BRANCHOL1
Excell 2 column : PATUAKHALI
how match and compare it…
Thank you

Link

Date

2024-10-06

Related UiPath products

Studio

@Samsuj_Joha

What you want to compare and match?

If you want matching rows or so…you can use join datatable

Cheers

Here i want to match string between two excell sheet.

Hi @Samsuj_Joha ,

You can try to follow below steps

  1. Read Range : : To store ‘Excell 1’ and ‘Excell 2’ column values in datatable.
  2. Use a For Each Row in DataTable activity to loop through each row.
  3. Use an If activity to check if values match.
    Condition : CurrentRow(“Excell 1”).ToString.Equals(CurrentRow(“Excell 2”).ToString)
    It will check if both column values are exact match.

If you want check if their is partial match, you can use Contains instead of Equals

thanks for your response…
but i need to here match specific one string…
here one string like:2194-909-0, PATUAKHALI BRANCHOL1
another string is:PATUAKHALI
in this case how to match the column…if i have many column data,how to solve that?please give me some knowledge…still i can not solve that

Can you please let me know if you want compare a particular string value to be matched with all values in a column.
Also, if you can share sample excel file screenshot that would be helpful.

this is two column here…here i want to match to take specific string.
|Column 1 | Column 2 |--- | --- | --- | ---| |PATUAKHALI | 2194-909-0, PATUAKHALI BRANCHOL1 | | | | Pubali Bank -6037 - Ranggabali,Golachipa | 2194-909-0, JHALAKATI BRANCHOL1 | | | | DDI Transfer | 4362-901-12267 M/S SHAHED POUL, GALACHIPA BRANCH (CD-12267)OL1 | | | | Jhalakathi Branch | 3677-998-0 EFT - PRIME BANK LIMITED, PRIMEPAY, COMP. - JESSORE FEED LTDEFTN3783971 | | | | Pbl-6037, Barguna ---1873-909-0, BARGUNA BRANCH OL 1 | 1873-909-0, BARGUNA BRANCHOL1 | | | | IAPP, OWN BANK FEED. A/C: 437*-***-***053, AROBINDU KUMAR PAUL. Trx.I | PIAPP, OWN BANK FEED. A/C: 437*-***-***053, AROBINDU KUMAR PAUL. Trx.ID 20240801-2-237017OL1 | | | | PIAPP, OWN BANK FEED. A/C: 437*-***-***053, AROBINDU KUMAR PAUL. Trx.ID 20240801-2- | PIAPP, OWN BANK FEED. A/C: 437*-***-***053, AROBINDU KUMAR PAUL. Trx.ID 20240801-2-237371OL1 | | | | petty cash reimbursement for the period of 11.06.2024 to 01.08.2024 | 2133-909-0, MADABPASHA BRANCHOL1 | | | | Paid advance for Misc. Exp. for tax exemption certificate for financial year-2024-2025-_ARF NO-843 | 2141-902-151 M/S SEFAT POU, SARSINA BRANCHOL1 | | | | Banarepara Madoppasha 6037 | 2141-909-0, SARSINA BRANCHOL1 | | | | DDI Transfer | 1873-909-0, BARGUNA BRANCHOL1 | | | | Barguna | 1873-909-0, BARGUNA BRANCHOL1 | | | | , SARSINA BRANCH OL 1 | 1101-901-15684 M/S MA POULTRY , HIZLA BRANCHOL1 | | | | | 3677-998-0 EFT - PRIME BANK LIMITED, PRIMEPAY, COMP. - JESSORE FEED LTDEFTN4474301 | | |


Hi @Samsuj_Joha,

Do you always need to check the same lines against each other?

If so, simply use .ToLower on both values and check if the longer value contains the shorter one.

Cheers!

would you like to use VBA to do the excel handling

here i want to check 0 index column to another 0 index column…after that 1,2,3 etc…
always take input from two excell file…and compare and finding match index wise.

yes her i use vb to do the excell handling

so you can do two looping

find each last row lets say A and B

use A to loop through B

For x = 0 to A
For y = 0 to B
If x = y then
End if
Next y
Next x

@Raymond_Hui
can you give me flowchart or condition?
how to write that?
this is my work here…





would you like to upload two excel and I write you some srcipts

Book1.xlsx (21.7 KB)
pubali bank.xlsx (28.2 KB)
this is my two excell file…here i want to match only Narration column…

Here is the script I use,

Book1 value as a mother to loop through pubali bank .xlsx, after that go back to Book1 next row and loop it again.

you can put these script into text files and use invoke method to run it

Please replace variable by yourself