+ Reply to Thread
Results 1 to 14 of 14

Lookup multiple sheets and produce unique results

  1. #1
    Registered User
    Join Date
    05-05-2017
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    16

    Lookup multiple sheets and produce unique results

    Hi all,

    I'm trying to figure out a fomula which looksup criteria among various sheets and returns a value. Issue is that there are a number of results and i can at the moment only get the first result. is there anyway that i can get the next result after the result in the cell above. I've attached a sheet with some made up data. The summary sheet and cells B2 to C5 contain the information that i want to appear with the data set out in sheets Project A & B.

    Can anyone help? i've been stuck on this for a while now.The best i can come up with is an Vlookup, Index, Indirect combo formula which produces the first result but can't manage to work out how to make the formula pick up the result after the preceeding cell.

    Appreciate any help.

    Cheers
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Lookup multiple sheets and produce unique results

    Sthomson1984 welcome to the forum.

    I haven't looked at your upload yet, but the description suggests there may be ways to do this using functions and features not available in all versions of Excel. This is why we ask for a detailed profile.

    Please tell us to what versions (years) this solution will apply and update your profile to reflect this.

    Edit Also please tell us the maximum number of rows and columns in the largest sheet of source data you anticipate.
    Last edited by FlameRetired; 05-07-2017 at 01:50 AM.
    Dave

  3. #3
    Registered User
    Join Date
    05-05-2017
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    16

    Re: Lookup multiple sheets and produce unique results

    Hi FlameRetired,

    Thanks for the reply. I've now updated my profile. I'm using Excel 2016 version 15.32.

    Cheers

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Lookup multiple sheets and produce unique results

    Thank you Sthomson1984.

    What about the columns and rows ... oh and number of sheets? I presume it's more than just the two?

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,192

    Re: Lookup multiple sheets and produce unique results

    It would be easier if all the input data was in one sheet by adding column with Project ID.

    It is much easier to extract from one sheet than to consolidate from many e.g report by project [which could be created dynamically].

    t
    Last edited by JohnTopley; 05-07-2017 at 04:19 AM.

  6. #6
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Lookup multiple sheets and produce unique results

    Hi Sthompson1984- Please take a look at this. It gives you the desired output, but it's not as flexible as I'd like. Hope it helps. - Lee
    Two formulas:
    in B2
    =IF(COUNTA('Project A'!B:B)<3,"",TEXT(OFFSET('Project A'!$A$1,MATCH(Summary!$A2,'Project A'!$A:$A,0)-1,COLUMN()-1),"0%")&" - Project A")

    in B3
    =IF(COUNTA('Project A'!B:B)<3,"",TEXT(OFFSET('Project B'!$A$1,MATCH(Summary!$A2,'Project B'!$A:$A,0)-1,COLUMN()-1),"0%")&" - Project B")

    Please click the Add Reputation star below any helpful posts, and if you have your answer, mark your thread as SOLVED (Thread Tools up top). Thanks!-Lee
    Attached Files Attached Files
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  7. #7
    Registered User
    Join Date
    05-05-2017
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    16

    Re: Lookup multiple sheets and produce unique results

    I have about 10 sheets 10 columns and about 60 rows.

    Quote Originally Posted by FlameRetired View Post
    Thank you Sthomson1984.

    What about the columns and rows ... oh and number of sheets? I presume it's more than just the two?

  8. #8
    Registered User
    Join Date
    05-05-2017
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    16

    Re: Lookup multiple sheets and produce unique results

    Yeah was thinking that if i can't get something together across multiple sheets


    Quote Originally Posted by JohnTopley View Post
    It would be easier if all the input data was in one sheet by adding column with Project ID.

    It is much easier to extract from one sheet than to consolidate from many e.g report by project [which could be created dynamically].

    t

  9. #9
    Registered User
    Join Date
    05-05-2017
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    16

    Re: Lookup multiple sheets and produce unique results

    Just a quick note. This formula gives me the result for the first result only. When i copy down though it's not getting the 2nd, 3rd, 4th etc results.

    =IFERROR(VLOOKUP($A$2,INDIRECT("'"&INDEX(SheetList,MATCH(TRUE,COUNTIF(INDIRECT("'"&SheetList&"'!$A$3:$A$35"),$A$2)>0,COUNTA($D$18:D18)))&"'!$A$3:$D$35"),2,0),"")

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Lookup multiple sheets and produce unique results

    Sthomson1984 you might want to have a look at the topic of "redimensioning" here:

    https://excelxor.com/category/redimensioning/

    and here:
    https://excelxor.com/2016/04/08/adva...le-worksheets/

    Redimensioning is just the first step. More challenges come with knowing what to do with the resulting array.

    While it's doable IMPO it reinforces what JohnTopley states above.

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Lookup multiple sheets and produce unique results

    Hi,

    You're making matters much more complex than they need be by setting up your Summary sheet in such a fashion. In particular, not repeating the names in column A for each row pertaining to that name means that the required construction becomes quite resource-heavy.

    I would suggest first doing precisely that, i.e. repeating the names in column A such that there are no blanks, after which, in B2, array formula**:

    =VLOOKUP(A2,INDIRECT("'"&INDEX(SheetList,SMALL(IF(COUNTIF(INDIRECT("'"&SheetList&"'!A2:A100"),A2)>0,TRANSPOSE(ROW(INDIRECT("1:"&COUNTA(SheetList))))),COUNTIF($A$2:$A2,$A2)))&"'!A2:XFD100"),COLUMNS($A:B),0)

    Copy across and down as required.

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  12. #12
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Lookup multiple sheets and produce unique results

    Edit:

    I should've mentioned that I assumed that SheetList is a horizontal vector, either within an actual worksheet somewhere, e.g. Y1:Z1, or, if stored within Name Manager, then (for English-language versions of Excel) comma-separated, e.g.:

    ={"Project A","Project B"}

    Adjustments will need to be made if you have in fact defined SheetList as a vertical vector, e.g. Y1:Y2, or:

    ={"Project A";"Project B"}

    Regards

  13. #13
    Registered User
    Join Date
    05-05-2017
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    16

    Re: Lookup multiple sheets and produce unique results

    Thanks for the reply, this works fine except for the fact that when copying down the result is the same as the cell above, i.e. the first result.


    Quote Originally Posted by XOR LX View Post
    Edit:

    I should've mentioned that I assumed that SheetList is a horizontal vector, either within an actual worksheet somewhere, e.g. Y1:Z1, or, if stored within Name Manager, then (for English-language versions of Excel) comma-separated, e.g.:

    ={"Project A","Project B"}

    Adjustments will need to be made if you have in fact defined SheetList as a vertical vector, e.g. Y1:Y2, or:

    ={"Project A";"Project B"}

    Regards

  14. #14
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Lookup multiple sheets and produce unique results

    Not for me.

    I used the workbook you provided, placed "John Smith" in A3 and "Paul Citizen" in A5, put the formula I provided in B2 (committed, as described, as an array formula) and copied down to B5, giving (after formatting the cells as %): 50%, 50%, 25%, 75%, as required.

    Regards

+ 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. Replies: 2
    Last Post: 07-28-2015, 09:22 PM
  2. Replies: 3
    Last Post: 06-25-2014, 02:40 PM
  3. Find multiple values in multiple ranges and produce results in a list
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2014, 02:11 AM
  4. Produce multiple results after searching a value
    By Stagnant in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2013, 06:55 AM
  5. Lookup formula that returns unique multiple search results
    By wit2001large in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2013, 08:09 AM
  6. Lookup formula that returns unique multiple search results WITH ATTACHMENT
    By wit2001large in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-23-2013, 06:02 AM
  7. Replies: 3
    Last Post: 01-16-2006, 02:10 AM

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