+ Reply to Thread
Results 1 to 8 of 8

Return a list from a table with multiple values per line

  1. #1
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Return a list from a table with multiple values per line

    Hi Guys,

    I am trying to create a new table (Output tab) from an existing table (Source tab). The source table has multiple values on each line and the new table needs to list these values as 1 per line while returning the values based on certain criteria.

    The table where the data is coming from (Source tab) has the following applicable columns that need to be picked up in the new table:

    1. Date Month of movement (Col G)
    2. From (origin) of movement (Col J)
    3. Class of movement (Col M to Col Z) - the data below the headings (M10:Z10) is the "NUMBER" being moved (column E in the new table) and is what we want to return in the new table but only 1 value (per class) on each row - currently the existing table can have multiple "class movements" per row

    The other tricky part is that the existing table has all move types - Internal, Purchase, and Sale. The new table will only require Internal movements to come through. - THIS IS WHAT HAS MADE IT SOOOO DIFFICULT

    I have been trying to use the AGGREGATE & SMALL function to create the new table (or better described as a list) however the fact that we only want to show Internal movements from a table that has all types of movements has got me stuck!

    NOTE - column structures of the existing and new table cannot be changed (however can be added to outside the structure).

    On the attached workbook I have added blue arrows to the existing table to indicate the columns that need to be populated on the new table. Also to help you further i have manually entered the data on the new table as it should appear when formulas are entered.

    Any assistance will be much appreciated.

    Cheers

    Mike

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,763

    Re: Return a list from a table with multiple values per line

    Are you using columns A to E in the Source sheet for anything? Can I use one as a helper column? (Is this construed as "outside the structure"?)

    Pete

  3. #3
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Re: Return a list from a table with multiple values per line

    Hi Pete, Yes you can. Feel free to use columns and rows to the left, right, above and below the table structure. Cheers

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,763

    Re: Return a list from a table with multiple values per line

    It's getting a bit late here, so I'll have to call it a day. I'll try to pick this up tomorrow if nobody else has chipped in overnight (for me).

    My reference is 1259.

    Pete

  5. #5
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Re: Return a list from a table with multiple values per line

    Ok thanks, talk tomorrow

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Return a list from a table with multiple values per line

    Please try

    Source!F11
    =COUNT(M11:Z11)

    Output
    A7
    =IFERROR(AGGREGATE(15,6,ROW(Source!$F$11:$F$600)/(Source!$F$11:$F$600/(Source!$L$11:$L$600=LEFT($B$4,8))>=COLUMN(Source!$A1:$N1)),ROWS(B$7:B7)),"")

    B7:C7
    =IF($A7="","",(INDEX(Source!$G:$J,$A7,MATCH(B$6,Source!$G$10:$J$10,))))

    D7
    =IF($A7="","",INDEX(Source!$10:$10,AGGREGATE(15,6,COLUMN(Source!M10:Z10)/(INDEX(Source!$M:$Z,$A7,)>0),COUNTIF(A$7:A7,A7))))

    E7
    =IF($A7="","",INDEX(Source!M:Z,$A7,MATCH($D7,Source!$M$10:$Z$10,)))
    F7
    =IF($A7="","",INDEX(Source!DJ:DZ,$A7,MATCH($D7,Source!$M$10:$Z$10,)))
    G7
    =IF($A7="","",INDEX(Source!BJ:BZ,$A7,MATCH($D7,Source!$M$10:$Z$10,)))

  7. #7
    Registered User
    Join Date
    07-06-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    46

    Re: Return a list from a table with multiple values per line

    Your'e a legend Bo, super efficient solution, thanks

  8. #8
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Return a list from a table with multiple values per line

    Thanks for the feedback and mark topic 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. Vlookup return multiple values horizontally for a list of values
    By lucipurr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2018, 11:00 AM
  2. Replies: 4
    Last Post: 05-12-2014, 07:10 PM
  3. Replies: 3
    Last Post: 12-13-2013, 06:23 AM
  4. [SOLVED] How to look up a value in a list and return multiple corresponding values
    By Clash in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-23-2013, 09:49 AM
  5. How to look up a value in a list and return multiple corresponding values?
    By arnabmit in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-28-2013, 07:43 AM
  6. Replies: 0
    Last Post: 08-02-2012, 09:04 AM
  7. Replies: 1
    Last Post: 04-24-2012, 03:02 AM

Tags for this Thread

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