+ Reply to Thread
Results 1 to 8 of 8

I have a drop down list that I want to use to lookup text values in another sheet!

Hybrid View

  1. #1
    Registered User
    Join Date
    02-09-2011
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    17

    I have a drop down list that I want to use to lookup text values in another sheet!

    Hello,

    I have a "dropdown list" on sheet 1 with names that i want to use as a lookup value. Will attach a picture of the dropdown list.

    On sheet 2 I have two colums A and B wich colum A matches the dropdown list with names in sheet 1 and cloum B has a text string.




    Example:

    A B

    AJO - Are Johan M.O057C.6M.A.0009
    AJO - Are Johan M.O057C.8M.1.0013
    AK - Anders M.O057C.3A.A.0001
    AK - Anders M.O057C.4A.A.0052

    What I want is to use the dropdown list on sheet 1 and retrurn all values for "AJO" in colum B (sheet 2) in anoter cell beside the dropdown list. To calrify a little more I want for each value found on AJO I want each value to return in separate cells. I hope it can look like this.

    A1 ("dropdown list" Are Johan) B1
    M.O057C.6M.A.0009
    M.O057C.8M.1.0013


    Hope some one can help me.
    Attached Files Attached Files

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

    Re: I have a drop down list that I want to use to lookup text values in another sheet

    If you are going to post sample file, please post Excel files... the forum has the capability and we can see what you see and test our possible suggestions.
    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
    02-09-2011
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: I have a drop down list that I want to use to lookup text values in another sheet

    Ok, here is the excel file.
    Attached Files Attached Files

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

    Re: I have a drop down list that I want to use to lookup text values in another sheet

    In C2 of Ark1:

    =IF(A2='Sheet 1'!$B$1,COUNT(C$1:C1)+1,"")

    copied down. This finds matches.

    In D2 of Ark1:

    =MAX(C:C)

    this gives total count

    In C2 of Sheet1 (or wherever you want to put list):

    =IF(ROWS($A$1:$A1)>Ark1!$D$2,"",INDEX(Ark1!$B:$B,MATCH(ROWS($A$1:$A1),Ark1!$C:$C)))

    copied down as far as you want.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-09-2011
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: I have a drop down list that I want to use to lookup text values in another sheet

    Quote Originally Posted by NBVC View Post
    In C2 of Ark1:

    =IF(A2='Sheet 1'!$B$1,COUNT(C$1:C1)+1,"")

    copied down. This finds matches.

    In D2 of Ark1:

    =MAX(C:C)

    this gives total count

    In C2 of Sheet1 (or wherever you want to put list):

    =IF(ROWS($A$1:$A1)>Ark1!$D$2,"",INDEX(Ark1!$B:$B,MATCH(ROWS($A$1:$A1),Ark1!$C:$C)))

    copied down as far as you want.


    Thanks a lot. Thats helped me a lot. Is it possible to get the list dynamic? I have set it up as I want now.
    Attached Files Attached Files

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

    Re: I have a drop down list that I want to use to lookup text values in another sheet

    Assuming the names in Ark1 are grouped together..

    Create 2 named ranges for the Ark1 sheet.

    Names referring to Ark1!$A$2:$A$102

    and

    Wbs referring to Ark1!$B$2:$B$102 then

    change the Data Validation List formula to:

    =OFFSET(INDEX(Wbs,MATCH(B1,Names,0)),0,0,COUNTIF(Names,B1),1)
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-09-2011
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: I have a drop down list that I want to use to lookup text values in another sheet

    Quote Originally Posted by NBVC View Post
    Assuming the names in Ark1 are grouped together..

    Create 2 named ranges for the Ark1 sheet.

    Names referring to Ark1!$A$2:$A$102

    and

    Wbs referring to Ark1!$B$2:$B$102 then

    change the Data Validation List formula to:

    =OFFSET(INDEX(Wbs,MATCH(B1,Names,0)),0,0,COUNTIF(Names,B1),1)
    It only turns out Value. Is this because I need add'ins? But thanks anyway. I don't need the list to be dynamic, but it would be cool to have it that way. I did not understand what you meant by two named ranges? Thanks a lot for helping me. I will fore sure post more on this site.

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

    Re: I have a drop down list that I want to use to lookup text values in another sheet

    You looked at C1 in the attachment? Don't mind the formula a few cells over.. that was a test. Just delete that... Cell C1 should have a drop down of the specific Wbs codes for the selected item in B1

    A named range is applying a name to range so that you can refer to it by name, instead of by reference like A1:B100.

    To name a range, select it and you can type the name in the Name box just to the left of the formula bar... or you can go to Formula tab and select Define Name and enter the Name and range... to see the ones I named, go to Formula tab and Name Manager.. select any to see the range it covers. We need to do this because this is the way to fool data validation to accept a range that is not on the same sheet.

    See here for more on Named Ranges: http://www.homeandlearn.co.uk/excel2...l2007s7p6.html
    Last edited by NBVC; 02-09-2011 at 11:10 PM.

+ 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