Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Update Next Row in Excel Table

(0) ShareShare
ReportReport
Posted on by 266

I have an Excel table with 3 columns - Index, Quote, and Display Turn.  I'm trying to create a flow that sends the 'Quote' of the day via email to staff.  The index column are numbers 1 through 184, quote column contains the quotes and display turn contains yes or no.  My thinking is that all rows in 'Display Turn' are set to 'no' except one and then to update the next row in the column to yes and the current to no at the end of the flow process.  I can get everything to work except updating the next row to 'no'.  Below are pics of my flow.   Initially, I was thinking if there was a way to get the Index and increment it by one to update the next row that would solve my problem, but I don't know how to do that.  Basically, I'm missing the last step (e.g., updating the next row) because I can't figure out how to do it.   Note: if there is a better way, I'm all for it.  

1.png2.png3.png

  • Verified answer
    v-liwei-msft Profile Picture
    on at
    Re: Update Next Row in Excel Table

    Hi @Mike44 ,

     

    I have made a test for your reference:
    vliweimsft_0-1656496848122.png

     

     

    vliweimsft_6-1656496931243.jpeg

     

     1.You can enter DisplayTurn eq 'yes' in the filter query in List rows present in a table to filter the rows where DisplayTurn is equal to yes

    vliweimsft_2-1656496848124.png

     

     

    2.Add a compose to view the index of the row whose DisplayTurn is yes. 

    vliweimsft_3-1656496848125.png

     

     

    3.Add update a row, use the Index column in the key column, and enter the formula add(int(outputs('Compose')), 1) in the key value. This will find the line next to the line where DisplayTurn is yes and change DisplayTurn to yes.

    4. Add another update a row, use the Index column in the key column, enter the index returned by compose in the key value, and change DisplayTurn to no.

    vliweimsft_4-1656496848125.png
     

    Best Regards,

    Levi

  • Verified answer
    eliotcole Profile Picture
    4,243 Super User 2025 Season 1 on at
    Re: Update Next Row in Excel Table

    With the greatest respect, @Mike44, a calculator (Excel) is the wrong place for this data, and you'll have a *much* easier time handling it within a SharePoint or Microsoft List. 😉

     

    Either way, my advice is the same, rename the Display_Turn column to quoteSent, and only send the top 1 result of those that have not been sent, then amend that result to having been sent.

     

    This is a purposefully general answer, and not specific to your exact field names and values ... so think openly about constructing it. 🙂

     

    To do this you just need to tap the 'Show advance options' on the Sheet/List and:

    • Filter Query the results by quoteSent eq No
    • Order By Index
    • Top Count 1

     

    This will return one result, which you can then send on, and update that row/item to change the quoteSent to Yes.

     

    The next time you run it, it won't return the same result.

     

    ( the actual value of quoteSent can be whatever you want it to be, a true boolean, or whatever, just make sure that you're reacting to it and changing it appropriately )

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1