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 / How to get "First free...
Power Automate
Answered

How to get "First free Field" of a Column (or workaround) in Excel

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there, I have an Excel Document which contains data. The Task is to read from the first 7 Columns, calculate with the data and fill the results in the same row, where it comes from. 

 

"First free row" adds the results AFTER my input data. I tried to work around with filling in an empty Column before the table, but it didnt work.

 

What would work aswell, if I can anyhow make in a loop: Fill in Column 9, field 2 [plus 1 per loop]. Because the fields are always the same. 

 

So for example:
Loop 1 writes to Column 9 Field 2

Loop 2 writes to Column 9 Field 3

Loop 4 writes to Column 9 Field 4
[...]

I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I found my workarount, maybe it helps others.

     

    I created a variable before the loop started. Loopcount = 1

    Then I added "increase variable" +1 in the loop. So each loop the variable raises.

    As last step I added "Write to excelfield Column 9 Row Loopcount

     

    Since I have headlines, I need to start with value 1 before the first loop. If you don't have headlines put in 0 or if you want to start later put in the last row number before the first field. 

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Loops have a built in variable called Loopindex for this reason. When I am doing something like Excel with a title row, I will start the LoopIndex at 2 (the first line of data), increment 1, and end at %FirstFreeRow - 1% (the last row of data). This way %LoopIndex% is always my row number. 

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 389

#2
Vish WR Profile Picture

Vish WR 331

#3
David_MA Profile Picture

David_MA 298 Super User 2026 Season 1

Last 30 days Overall leaderboard