Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Mtach 2 strings in excel and give results

(0) ShareShare
ReportReport
Posted on by 42

Hi Team,

 

I am having an Excel sheet in that I need to match 2 columns and If it matches I need to get results in Percentage

say for example :

Abisheck_Canary_0-1675777119737.png

 

Like this I am having 2 column I need to find out matching Percentage of these.

Any ideas of how to do?? Thank you in advance!!!

  • Abisheck_Canary Profile Picture
    Abisheck_Canary 42 on at
    Re: Mtach 2 strings in excel and give results

    Thanks for the response .

    what you given is very much useful 👍 Thanks a lot again!!!

     

  • Expiscornovus Profile Picture
    Expiscornovus 31,118 on at
    Re: Mtach 2 strings in excel and give results

    Hi @Abisheck_Canary,

     

    Can you clarify you definition of match? Does it need to match the exact value of column1 or can it match against part of the value as well?

     

    In case of the first scenario you can use something like the example below.

     

    In an update row I use the following expression in a new percentage column.

    This expression uses a indexOf to check if the value of column1 is is found in column2. If that is the case (not equals to -1). The length of both values are converted to float values and used in a div calculation and formatted as a percentage value via formatnumber with the P2 format.

    if(equals(indexOf(item()?['column2'], item()?['column1']), -1), 0, formatnumber(div(float(length(item()?['column1'])), float(length(item()?['column2']))), 'P2'))

     

    updaterow_percentages.png

     

    This would result in the following percentages

     

    percentagematch.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard