Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

Update multiple rows without unique column and value (and without Office Script)

Like (0) ShareShare
ReportReport
Posted on 7 Jul 2023 03:52:55 by

Hi, I want to update rows in excel based on certain conditions, but my table does not have unique column. I also cannot manually add unique column in the excel file because it will defeat the dynamic purpose. 

 

How can I create the unique column and value solely using Power Automate itself and update multiple rows? I don't have Office Script running in my current version of Excel.

  • Verified answer
    trice602 Profile Picture
    13,768 Super User 2025 Season 1 on 07 Jul 2023 at 20:27:21
    Re: Update multiple rows without unique column and value (and without Office Script)

    Hi @Anonymous ,

     

    Here you go!  Please give me a thumbs up and mark as a solution if this works for you - always glad to help! Tom

     

    So in this case, let's assume there isn't a column with unique values and to do this we need to create a temporary unique column values as we create our key.  Remember, step one is to simply add the key column in a separate flow that you already completed.

     

    Next in my sample data, you can see I don't have a column with distinct values.  I will create a random number as my keyvalue from 11111111 to 99999999.  As we create the keys, I am referencing my description column and making it unique as I go through each row by adding [xxxx] at the end.  This allows me to assign keyvalues to rows that have duplicate description values.

     

    My description concat is:  concat(items('Apply_to_each')?['Description'],' [',rand(1111,9999), ']')

     

    My keyvalue is: int(rand(11111111, 99999999))

     

    Not included here - if you absolutely needed to remove the temporary value in the description, you could loop back through each row and capture the length and only keep the length - 7; to remove _[xxxx] and I would do that in a separate clean up flow.

     

    This was a little bit of a challenge but works.

     

    key2.png

     

    key3.png

    key4.png

     

    key5.png

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - Building Flows

#1
David_MA Profile Picture

David_MA 385 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 330

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 328 Super User 2025 Season 1

Overall leaderboard
Loading started
Loading started
Loading complete