+ Reply to Thread
Results 1 to 26 of 26

Matching Asset List to Unit

  1. #1
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Matching Asset List to Unit

    I have 2 tables as follows:

    Table1:
    Table1.png

    Table2:
    Table2.png

    I want to match the asset number in brackets in Table2 to asset in Table1, to produce a third table:

    Table3:
    Table3.png

    Any help highly appreciated!

    Thank you.
    Joseph
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Matching Asset List to Unit

    Do uou have O365 yet??
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Hi Glenn, not in my office laptop. Though, can access via my hotmail account. Thank you.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Matching Asset List to Unit

    That doesn't quite answer my Q. Whatr Excel Product do you want the solution to work for? Your profile shows TWO products... and you have access to O365. So, which is the earliest version you want any solution to work for? If that is ALWAYS the case, then amend your profile accordingly.

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Matching Asset List to Unit

    I found a solution for O365, but it is difficult (for me) to translate this to a solution for older versions.

    Please try in O365:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by HansDouwe; 01-05-2024 at 10:25 AM.

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Hi Glenn, above is my personal file, so it's okay if in 365. But for office work, I cannot use 365.

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    PQ solution is also welcome!

  8. #8
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Thanks Hans, your solution is working very well!

  9. #9
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,942

    Re: Matching Asset List to Unit

    For 2016,

    D13 and copy down.
    Please Login or Register  to view this content.
    E13 and copy down.
    Please Login or Register  to view this content.
    F13 , copy down and across.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Thank you, windknife. It's working fine! Any PQ solution?

  11. #11
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Header for Table3 with just the number, i.e. no asset name would be fine with me. Thank you.

  12. #12
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Matching Asset List to Unit

    Thanks for the feedback and rep . Glad to have helped.

    I also found a solution for Excel 2021 (everything in one go)

    Please try in Excel 2021 or in O365:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Matching Asset List to Unit

    Header for Table3 with just the number
    2021 Formula: replace MID(f,g+1,99) with LEFT(f,g-2,99)
    365 Formula: replace TEXTAFTER(INDEX(Table1,c-2)," ") with TEXTBEFORE(INDEX(Table1,c-2),".")
    Attached Files Attached Files

  14. #14
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,802

    Re: Matching Asset List to Unit

    Joseph
    As requested, I did not rearrange columns and rows. This is can be done either in PQ or in Excel. But all aligns as shown in your expected solution. A bit of a convoluted PQ, however.

    Here is a Power Query Solution.

    Please Login or Register  to view this content.
    Excel 2016 (Windows) 64 bit
    D
    E
    F
    G
    H
    I
    J
    K
    27
    No. Unit Chair Table Table Lamp Side Table Sofa Fan
    28
    1 1-2 x x
    29
    10 12-1 x
    30
    11 3-3 x
    31
    12 33-3 x x x
    32
    2 2-2 x x x
    33
    3 23-1 x
    34
    4 17-2 x x x x
    35
    5 3-1 x x x
    36
    6 19-3 x
    37
    7 33-2 x x x
    38
    8 19-2 x x x
    39
    9 21-1 x
    Sheet: Sheet1
    Last edited by alansidman; 01-06-2024 at 12:55 PM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  15. #15
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Thank you Hans for your solutions in posts #12 and #13.

  16. #16
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Thank you Alan for answering my PM. And thanks for the PQ solution, it works nicely! The code is very structured and I can understand perfectly.
    .
    Just one thing.. is it possible to maintain the sequence of the assets in Table1 in the final result?

  17. #17
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Matching Asset List to Unit

    Thanks for the nice question Joseph and rep again. It was fun and educational to make these formulas. .
    Last edited by HansDouwe; 01-06-2024 at 10:15 PM.

  18. #18
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,802

    Re: Matching Asset List to Unit

    I think this is what you are looking for

    Please Login or Register  to view this content.

  19. #19
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Hi Alan, thanks again. The reorder line does give me the correct result. But, is it possible to not hardcode it? The asset list in Table1 is expandable.

  20. #20
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,802

    Re: Matching Asset List to Unit

    Joseph,
    I am unsure of what you are referring. I don't recall hardcoding any fields.

  21. #21
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Thanks for checking back, Alan.

    This line is hard-coded:
    PHP Code: 
    #"Reordered Columns" = Table.ReorderColumns(#"Pivoted Column",{"No.", "Unit", "Table", "Chair", "Sofa", "Fan", "Table Lamp", "Side Table"}) 

  22. #22
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,802

    Re: Matching Asset List to Unit

    Alternatively is to not reorder the columns or to reorder them alphabetically which I have done in the latest Mcode. Those are the only options I can think of.

    Please Login or Register  to view this content.
    Excel 2016 (Windows) 64 bit
    D
    E
    F
    G
    H
    I
    J
    K
    27
    No. Unit Chair Fan Side Table Sofa Table Table Lamp
    28
    1
    1-2 x x
    29
    2
    2-2 x x x
    30
    3
    23-1 x
    31
    4
    17-2 x x x x
    32
    5
    3-1 x x x
    33
    6
    19-3 x
    34
    7
    33-2 x x x
    35
    8
    19-2 x x x
    36
    9
    21-1 x
    37
    10
    12-1 x
    38
    11
    3-3 x
    39
    12
    33-3 x x x
    Sheet: Sheet1

    EDIT: Had an after thought and that would be to keep the number of the Asset aligned with the Asset to keep it in the order in the table of Assets. Your thoughts?
    Last edited by alansidman; 01-07-2024 at 06:04 PM.

  23. #23
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,802

    Re: Matching Asset List to Unit

    I changed this code up a bit to keep the order of the columns in the same order as you have provided in the Asset Table. This will eliminate any "hard coding" or movement of columns

    Please Login or Register  to view this content.

  24. #24
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Thank you, Alan! Perfect now! Here's a Rep for you!

  25. #25
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,802

    Re: Matching Asset List to Unit

    Thanks Joseph for the Rep. If this solves your issue, please mark the thread as solved.

  26. #26
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Matching Asset List to Unit

    Oh ya, thanks for reminding Alan. Now marked solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Random select an asset number from a list based on one condition
    By letitbe0430 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-22-2019, 03:44 AM
  2. Replies: 11
    Last Post: 08-14-2019, 07:05 PM
  3. Unit Price Matching Material Code and UOM
    By bj90 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2019, 04:10 PM
  4. Unit Price Matching Column and Row Codes
    By bj90 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2019, 10:11 AM
  5. Replies: 1
    Last Post: 08-15-2016, 08:37 PM
  6. Replies: 4
    Last Post: 10-07-2015, 06:04 AM
  7. Replies: 0
    Last Post: 04-15-2014, 12:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1