web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / If else function and d...
Power Automate
Answered

If else function and duplicate data did not appear

(0) ShareShare
ReportReport
Posted on by

Hi all,

I'm new to Power Automate Desktop,

I created this if else flow. But the result in excel did not appear if the employee number is duplicate. Supposedly it will appear either "Matched", "Transferred" or "Terminated". why did in the excel did not appear any status if the number is duplicate? I want to make the status appear even though the data is duplicate.
eg:

 

1001: Matched

1001: Matched

1078: Transferred
1056: Matched
1078: Transfered
nraindmia_0-1692672686696.pngnraindmia_1-1692672715361.png

nraindmia_3-1692673107621.png

 

Thank you 🙂

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @nraindmia 

     

    Could you show me the entire code for this and share what you are trying to do here to get an idea around the flow 🙂

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • nraindmia Profile Picture
    on at

    Sure !

    nraindmia_6-1692673808046.pngnraindmia_1-1692673621153.png

    nraindmia_2-1692673642351.pngnraindmia_4-1692673674315.png


    For now, when they found the duplicate data, they will not put any status inside the column because the status has been write for the previous data. I want the status to be write for all even though it is duplicate data and has been written the status before. I don't want the status to be empty.

     

    nraindmia_7-1692674393707.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    That is because you are using the Find and replace cells in Excel worksheet to only return the first match. Enable the "All matches" toggle to find all duplicate values:

    Agnius_0-1692676539311.png

     

    Note that this will return a data table of matches, called %Cells%, instead of two separate variables for indexes. You will need to loop through this data table to handle each match separately.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • nraindmia Profile Picture
    on at

    can you show me which line to toggle it on for find and replace? I have 3 find and replace. do i need to toggle for all 3? 

    nraindmia_1-1692677404019.png

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The way I understand your issue, is that you need it for the last line (line #20). Not sure if you need it for the others, as you're not really using the other indexes to write anything, and just to read data.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • nraindmia Profile Picture
    on at

    I change into cells and it appear this error :

    nraindmia_0-1692678221181.png

    nraindmia_1-1692678292587.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    As mentioned, %Cells% will now be a data table with multiple row and column indexes. You need to build a loop on it and process each value individually.

  • nraindmia Profile Picture
    on at

    How to build a loop on it and process each value individually? sorry 😞

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Do a For each loop on %Cells% storing the current item in %CurrentCell%.

    When you do that, you can use %CurrentCell['Row']% to get the row index and %CurrentCell['Column']% to get the column index. You might need to use Convert text to number to convert those indexes to integers, as they are usually stored as text by PAD in tables for some reason.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • nraindmia Profile Picture
    on at

    I don't really get what to do actually, still got an error. or you can show me a simple example of how to do it? 

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 273 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 172 Super User 2026 Season 2

Last 30 days Overall leaderboard