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.
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.
David_MA
385
Super User 2025 Season 1
stampcoin
330
Michael E. Gernaey
328
Super User 2025 Season 1