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 / Suggestion needs for b...
Power Automate
Unanswered

Suggestion needs for building a power automate desktop flow.

(0) ShareShare
ReportReport
Posted on by 74

Hi all.

I have an excel data from an excel worksheet. It contain 11 rows and 16 columns. (see some pictures below)

Atlantis1_0-1701601461450.png

Atlantis1_1-1701601667108.png

My flow will ask a user to enter T1001 for example and with that value i need to find and display all the information belongs to T1001 (even T1001 (2)) columns in that excel data which matches what the user has entered. Basically the user only enters any T number within that data table and my job is to find and display all the information belongs that match the user´s entered T number.

 

This is what my flow looks like at the moment.

Atlantis1_2-1701602449664.png

the problem is that it only shows T1001 and not T1001 (2). This is what i would like the result to be.

Atlantis1_3-1701602704817.png

I´d appreciate any help and thankful if explanation is easy to understand since i´m newbie. Thanks again.

 

 

 

  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Use find and replace activity

    enable regular expression option then give the pattern as  T1001.*

    UshaJyothi20_0-1701675193907.png

    then give these column names to retrieve coloumn into list activity 

     

    Hope this helps

    Usha 

    for more clarification please share sample excel file so that i can give a try

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    VBA would make faster work of this.

     

    Get input from user
    For each column, if row 1 value does not contain input, delete column.

     

    Advantage:  Your team could use this directly in Excel, and they wouldn't need to use PAD.

     

    Further functionality.  You could just create a single macro (no input needed) that divides the workbook up into all variations (1 workbook per user) and saves out each workbook for them to access.

     

    I don't know what happens after this phase of your flow, but if each one was already separated, it would be really easy for the bot to grab it, then you don't need the bot to do anything but:

    Open workbook
    Run Macro
    'then do whatever else you were going to do with the data

    Good luck!

  • Atlantis1 Profile Picture
    74 on at

    Hi MichaelAnnis.

    Thanks for your suggestions. I never thought VBA can be a solution. My problem is that i´m not neither as good as you in vba or pad. But i will try to digest your suggestion and let see how far i can go. 

     

    Hi Usha.

    Thanks for your time looking at my request. You suggest enable regular expression function and i´d be grateful if you can create a flow so i can try and learn some new feature in pad.

    Please take a look at my shortcome flow:

    SET FilePath TO $'''C:\\Users\\DD\\Desktop\\PAD\\WM interface per maskin\\W interface per maskin_test.xlsx'''
    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: FilePath Visible: True ReadOnly: True Instance=> ExcelInstance
    Excel.GetFirstFreeColumnRow Instance: ExcelInstance FirstFreeColumn=> FirstFreeColumn FirstFreeRow=> FirstFreeRow
    Excel.ReadFromExcel.ReadCells Instance: ExcelInstance StartColumn: $'''B''' StartRow: 1 EndColumn: FirstFreeColumn - 1 EndRow: FirstFreeRow - 1 ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData
    Excel.CloseExcel.Close Instance: ExcelInstance
    Display.InputDialog Title: $'''VERKTYGS KOMPENSERING FÖR SVARVSTÅL''' Message: $'''Skriv SvarvStål börjar me T''' InputType: Display.InputType.SingleLine IsTopMost: False UserInput=> UserInput ButtonPressed=> ButtonPressed
    Variables.CreateNewDatatable InputTable: { ^['Column1', 'Column2', 'Column3', 'Column4'], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''], [$'''''', $'''''', $'''''', $''''''] } DataTable=> DataTable
    LOOP FOREACH CurrentItem IN ExcelData.Columns
    IF Contains(CurrentItem, UserInput, False) THEN
    DISABLE Variables.RetrieveDataTableColumnIntoList DataTable: CurrentItem ColumnNameOrIndex: UserInput ColumnAsList=> ColumnAsList
    Display.ShowMessageDialog.ShowMessage Message: CurrentItem Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed2
    END
    END

    and this is the excel file.

     

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Use the Find or replace in data table action and make it return all matches, as well as not try to match the full cell contents.

     

    This will return a data table with column and row indexes for each match found in the table. Each match will result in a row in the matches table. You can then use those to return all data from your original data table.

    -------------------------------------------------------------------------

    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.

  • Atlantis1 Profile Picture
    74 on at

    Hi Agnius

    I tried your suggestion but no matter what i have like all matches in Find or replace in data table action it still has this:

    Atlantis1_0-1701805570343.png

    and when i open DataTableMatches it is empty.

    Atlantis1_2-1701805822523.png

    This is my exceldata which contains 11 rows 16 columns with first row is header.

    Atlantis1_1-1701805706044.png

    This is my selection in Find and replace action

    Atlantis1_3-1701805977279.png

     

    Thanks.

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    It doesn't find anything. And that's because the value you are looking for is not within the values of the table, but are in fact in the header row.

     

    When that is the case, you don't need to find it. You can reference a value like this: %ExcelData[0][UserInput]%. The 0 here indicates row 1. Depending on which row you want, you can pass a different index (or use a loop to get all of them). You can also use %UserInput% as the name of the column in Retrieve data table column into list to retrieve the entire column into a list, and have a list of all the items related to this one code from user input.

    -------------------------------------------------------------------------
    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 229 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 223 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard