+ Reply to Thread
Results 1 to 4 of 4

Lookup table and repeat items corresponding number of times found in table

  1. #1
    Registered User
    Join Date
    01-26-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Lookup table and repeat items corresponding number of times found in table

    Hi,
    I am trying to create a lookup that looks at the following table:

    Windows Doors Roofs Chimneys
    Building 1 2 4 1 4
    Building 2 9 5 2 8
    Building 3 18 5 1 4


    I want to input into a cell BUILDING 1

    And return the following:

    Window
    Window
    Door
    Door
    Door
    Door
    Roof
    Chimney
    Chimney
    Chimney
    Chimney


    Example attached.
    Any help would be much appreciated!
    Attached Files Attached Files
    Last edited by NBVC; 01-27-2011 at 10:37 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Lookup Help

    Try this:

    Add a helper row... so in B7 enter:

    =SUM(INDEX($B3:$B5,MATCH($A$10,$A$3:$A$5,0)):INDEX(B3:B5,MATCH($A$10,$A$3:$A$5,0)))

    copied across the 4 columns. This gives cumulative sum of specific building product requirements.. now in B11:

    =IF(ROWS($A$11:$A11)>$E$7,"",INDEX($B$2:$E$2,MIN(IF(ROWS(A$11:A11)<=$B$7:$E$7,COLUMN($B$2:$E$2)-COLUMN($B$2)+1))))

    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down as far as you want in order to ensure you always capture all possibilities.

    if you don't want the ending "s" change the table titles at top.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by NBVC; 01-26-2011 at 05:18 PM. Reason: Replaced SMALL with MIN in formula.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-26-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Lookup table and repeat items corresponding number of times found in table

    Thats great, thankyou very much.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Lookup table and repeat items corresponding number of times found in table

    Please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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