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 / Get info from the same...
Power Automate
Answered

Get info from the same row diffrent column

(0) ShareShare
ReportReport
Posted on by 14

Hi

So I have 2 excels

First one has col 1 row 1 Name1 , row 2 Name2 , row 3 Name3

Second one has col 1 row1 Name3, row 2 Name2 , row 3 Name1 and same more info in every row on col5

and I want to get the info from the same row col5 when the names match 

like if Name3(first excel)=Name3(second excel) get same row Name3(second excel) col5 

I don't know how to get the same row as the name 

Thank for help 

  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Could you please provide some screen shots of sample data and required output data, so that we can give a try....

     

  • GiorgioG Profile Picture
    14 on at

    GiorgioG_0-1702376920573.png

    GiorgioG_2-1702377033354.png

     

    If name3(in first excel)=name3(second excel) output info3

     

  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Got it will give a try and get back to you

  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    ike if Name3(first excel)=Name3(second excel) get same row Name3(second excel) col5 

    this means if name matches in both excels then you need the value in info column right?

  • GiorgioG Profile Picture
    14 on at

    That is right

  • Verified answer
    UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Hi @GiorgioG 

     

    I have created a sample flow once you try it tell me if it meets your requirements. copy and paste the following code into the PAD designer 

    UshaJyothi20_0-1702379858802.png

     

     

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Users\\cogni\\OneDrive\\Desktop\\File1.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData1
    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Users\\cogni\\OneDrive\\Desktop\\File2.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance2
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance2 ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData2
    Variables.CreateNewList List=> List
    Variables.RetrieveDataTableColumnIntoList DataTable: ExcelData1 ColumnNameOrIndex: $'''Name''' ColumnAsList=> ColumnAsList
    LOOP FOREACH CurrentItem IN ColumnAsList
    LOOP FOREACH CurrentItem2 IN ExcelData2
    IF CurrentItem = CurrentItem2[0] THEN
    Display.ShowMessageDialog.ShowMessage Title: $'''Result''' Message: CurrentItem2[4] Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
    END
    END
    END

     

    Hope this helps,

    Usha.

  • GiorgioG Profile Picture
    14 on at

    Thank you!!

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I would really suggest avoiding nested loops, as it's extremely inefficient to do that. Especially with larger files to be matched. Reading the data from both Excel files and then using Find or replace in data table is a much more efficient approach - this will return the row index for a matched row that can then be used to retrieve the values from other columns, too.

    -------------------------------------------------------------------------
    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.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 245 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard