+ Reply to Thread
Results 1 to 10 of 10

Need help! Array Forumla to provide multiple occurences of same vlookup!?

  1. #1
    Registered User
    Join Date
    10-04-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    8

    Need help! Array Forumla to provide multiple occurences of same vlookup!?

    I have a sheet of data which I would like to format to make easily accessible and searchable.

    Column A contains the names of employees, and in Column B adjacent to their name is a list of safety memos that they have signed-off. I copied their name down the column next to each memo so that each B value has a corresponding A value directly adjacent (their name repeats next to each memo they've signed until the next name begins.)

    Now, I created a separate sheet as a "homepage" which I would like to use to search and filter the data. I made a small dropdown list of each name that occurs in Column A. This is in cell B4 on the sheet. So for whichever name is selected in B4 I would like to display a list of the memos they have completed next to it starting in C4 and expanding down the column.

    Not too complicated I would think, right? Well I tried a Vlookup function which I am firmiliar with, but that would only display the very first occurance. I realized at this point that I would need to use an Array formula, which I am not firmiliar with. I did a little google search and found some seemingly helpful links however after many attempts of trial and error I am still stuck.

    Here is what I have so far:

    =INDEX('Cooks Training'!A1:A2927, SMALL(IF($B$4='Cooks Training'!A1:A2927,ROW('Cooks Training'!A1:A2927)),ROW(1:1)),2)
    which returns a reference error.

    'Cooks Training' is the data sheet. Cells A1:A2927 contain the names (repeating) of each employee on this sheet, and Cells B1:B2927 contain the names of the memos of which they have completed (with a couple blanks in this column as well.)

    Please help me guys, I would love to be able to just select a name from the dropdown list in Cell B4 and have a list of their memos displayed starting in cell C4 and expanding down.

    Training & Sign-offs2.xls
    Attached Files Attached Files
    Last edited by reeserobs; 01-15-2013 at 03:01 PM.

  2. #2
    Registered User
    Join Date
    10-04-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need help! Array Forumla to provide multiple occurences of same vlookup!?

    anyone? suggestions even? need this done today :/

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need help! Array Forumla to provide multiple occurences of same vlookup!?

    To be able to see a list of names as you describe will need a macro in the SheetChange event. (VLookups only return a single value).

    But have you considered a Pivot Table, or failing that just simply using an Autofilter on your data?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    10-04-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need help! Array Forumla to provide multiple occurences of same vlookup!?

    Well I would like to have it on a separate sheet and look as clean as possible. I've seen there is a way to do this through my searching but it required an array formula which I am not firmiliar with.

    I would like a list of values to come up in the corresponding column of the multiple cells that are adjacent to that employees name on the data sheet.

    Example:

    Data sheet:
    Joe Sheet 1
    Joe Sheet 2
    Joe Sheet 3
    Joe Sheet 4
    Diana Sheet 2
    Diana Sheet 3
    ...

    then on the index page I would select Joe from the dropdown menu and in the next column it would look as such:

    Joe Sheet 1
    Sheet 2
    Sheet 3
    Sheet 4
    then if i change the selection to Diana it would appear:

    Diana Sheet 2
    Sheet 3

    and etc.

  5. #5
    Registered User
    Join Date
    10-04-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need help! Array Forumla to provide multiple occurences of same vlookup!?

    Uploaded the file and attached to first post to give you guys a better idea

  6. #6
    Registered User
    Join Date
    10-04-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need help! Array Forumla to provide multiple occurences of same vlookup!?

    Ok so I was able to find the =VlookupAll function on a google search, created the module, and now am using it properly however one small problem..

    The result is a string of text and not a column of rows containing values. So, instead of:

    Sheet 1
    Sheet 2
    Sheet 3
    Sheet 4

    being displayed in the correct column, it displays in the one cell:

    Sheet 1, Sheet 2, Sheet 3, Sheet 4,...

    Now I am firmiliar with splitting a string of text into rows, however since this text is a the result of a function I am not able to do this to my knowledge. Could anyone shed any light on my situation? Thanks!

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need help! Array Forumla to provide multiple occurences of same vlookup!?

    Hi,

    Here's the Pivot table option which I mentioned. You refer to VLOOKUPS in your post but I'm not sure why since as I said they only return one value, but in any case I couldn't see any in your file. Just select a name from B1 which is an inherent part of the Pivot Table.
    Attached Files Attached Files

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Need help! Array Forumla to provide multiple occurences of same vlookup!?

    you could try this array formula in C4 of the Homepage Index sheet :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Enter With Cntrl+Shft+Enter
    drag down

    Training & Sign-offs2.sol2.xls

    Hope this helps
    Last edited by dredwolf; 01-15-2013 at 07:09 PM. Reason: wrong workbook
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  9. #9
    Registered User
    Join Date
    01-17-2013
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Need help! Array Forumla to provide multiple occurences of same vlookup!?

    dredwolf:

    I was able to use your solution provided for a sheet I'm working on. I was wondering how you would modify this formula to screen the results by additional criteria. say in addition to b4 there was another criteria in b7 on sheet Homepage Index corresponding with a column C on the Cooks Training sheet. Im assuming the added criteria would be incorporated into the "if" statement but I am way beyond my depth here and could use the help. File attached for your feedback, thanks
    Attached Files Attached Files

  10. #10
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Need help! Array Forumla to provide multiple occurences of same vlookup!?

    Jdubs, you should start a new thread, if you think this thread is particularly relevant, provide a link to it

    Meanwhile, I'll have a look at it

+ 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