Skip to main content

Notifications

Community site session details

Community site session details

Session Id : RN/AFwdCUzuZT1UWZyLnlz
Power Automate - Power Automate Desktop
Answered

Lookup data table or Excel in Power Automate Desktop

Like (0) ShareShare
ReportReport
Posted on 1 Nov 2022 15:16:10 by 16

Hi,

 

Can someone help me find out how to look up multiple values in a excel sheet.

It should find a specific value in column 3 and then return the value in column 2 from the same row in Excel.

When the value (in this case name) only appears once it seems pretty clear. I used the Find and replace cells in worksheet. And then read from excel using the found row and found column.

However when the name appears multiple times in the worksheet I got a problem.

Instead of the found rows and columns I get a datatable %Cells%.

Can someone help me on how I can use the data to find the matching rows in a loop for each name?

 

  • Verified answer
    Mels_robots Profile Picture
    16 on 03 Nov 2022 at 13:21:37
    Re: Lookup data table or Excel in Power Automate Desktop

     @VJR sorry I’ve found my bug.

    I used %Cells% instead of %Current_Cell% from the loop in the Read From Excel StartRow. 🥴🤦🏻‍

    Finally got I right 🙂 

     

    thanks again.

  • Mels_robots Profile Picture
    16 on 03 Nov 2022 at 12:11:55
    Re: Lookup data table or Excel in Power Automate Desktop
    5D750181-447A-4899-BE77-7AC5B627889F.jpeg

      

    Hi @VJR  ,

    thanks for your reply.

    I’ve tried this but can’t get it to use the data table %Cells% is my syntax wrong? I’ve tried both with and without the ‘ in %Cells[RowIndex]%

     

  • VJR Profile Picture
    7,635 on 02 Nov 2022 at 02:59:13
    Re: Lookup data table or Excel in Power Automate Desktop

    Hi @Mels_robots

      

    If you keep the All Matches enabled, then it will give you the Cells datatable.

    If disabled, then it only gives the Found Row and Column.

     

    VJR_5-1667357623516.png

     

     

    If you are going to have multiple matches then use All Matches.

    Whether you have a single match or multiple the below loop will read them.

     

    - Add a For each loop

    - Use the Cells Datatable for the Loop

     

    You can make use of the %Cells.RowsCount% property if you want to know whether there is a single match or multiple or no match at all.

     

     

     

     

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard
Loading started