+ Reply to Thread
Results 1 to 15 of 15

Selection from first Drop Down List determines information in the other cells

  1. #1
    Registered User
    Join Date
    02-08-2015
    Location
    Australia
    MS-Off Ver
    2011
    Posts
    22

    Selection from first Drop Down List determines information in the other cells

    Hi,
    Let me try to explain this as clearly as i can. Basically, i have students information on one sheet, this consists of names, students number and contact phone number - a long list of this. So on sheet 1 i have 3 columns with the previously mentioned titles.

    On sheet 2, i have 3 cells, I want the first cell (names) to give the user a drop down list and choose a student name, then from this selection, i want student number and phone number to automatically fill in, i keep finding info about dependant data validation drop down list, but i don't need more than 1 drop down list and thats in sheet2 B4, and the rest is dependant on that selection. Can anyone help?

    Much appreciated
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Selection from first Drop Down List determines information in the other cells

    Hi, welcome to the forum

    i keep finding info about dependant data validation drop down list
    That is becasue what you want is not (necessarily/directly) linked to DV. Try this for the Number...
    =VLOOKUP($B4,Sheet1!$A$2:$C$7,2,0)
    and this for the Phone...
    =VLOOKUP($B4,Sheet1!$A$2:$C$7,3,0)

    On a side-note...is there a chance that you could have duplicate names?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Selection from first Drop Down List determines information in the other cells

    I can kind of get you started with a formula. You will have to remove the dropdown in E4 and H4 for it to work though. PLace this in E4
    Please Login or Register  to view this content.
    and this in H4
    Please Login or Register  to view this content.
    This isn't the final solution, but might help get things going in the right direction.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Selection from first Drop Down List determines information in the other cells

    @ gmr, that is moving in the right direction, and would work just fine for 3-4 names. After that, the nesting becomes more and more complex and involved - and error-prone. A better option, especially with "a long list" (OP's words) would be to use some form of lookup...VLOOKUP() is pretty simple

  5. #5
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Selection from first Drop Down List determines information in the other cells

    My bad, I forgot they had a longer list than the one in the sample file.

  6. #6
    Registered User
    Join Date
    02-08-2015
    Location
    Australia
    MS-Off Ver
    2011
    Posts
    22

    Re: Selection from first Drop Down List determines information in the other cells

    Hmmm, it wouldnt be impossible to have duplicate names, then if we had a duplicate name then the student number would be the only thing to differentiate them....therefore another dropdown would be required

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Selection from first Drop Down List determines information in the other cells

    I would suggestthat you do this the other way round - enter the student ID (which should be unique?), and then pull in the other data based on that?

  8. #8
    Registered User
    Join Date
    02-08-2015
    Location
    Australia
    MS-Off Ver
    2011
    Posts
    22

    Re: Selection from first Drop Down List determines information in the other cells

    Thanks guys! yes, the list of students would be long and extensive which rules out the if formula.
    Thanks Fdibbins, that works great...can u explain the vlookup value $B4? Why is that the first chosen value? ****My bad - i get it now!!!*** Thanks, last time i used this was at uni
    =VLOOKUP($B4,Sheet1!$A$2:$C$7,2,0)
    and this for the Phone...
    =VLOOKUP($B4,Sheet1!$A$2:$C$7,3,0)

    Yes, i should put student number first.....
    Last edited by rainbow612; 02-08-2015 at 09:20 PM.

  9. #9
    Registered User
    Join Date
    02-08-2015
    Location
    Australia
    MS-Off Ver
    2011
    Posts
    22

    Re: Selection from first Drop Down List determines information in the other cells

    This might not be the place to do it, but i am wondering if its possible to create a drop down list to appear on the second page that would only list the absent students, and maybe not all of them, so i create a new column in sheet1, A is for absent and / is for present - the drop down list can come from this, i am guessing this required an if formula, so in column d, if A appears then that students name should appear on the drop down list on the next page....

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Selection from first Drop Down List determines information in the other cells

    Can you upload a revised WB, with a sample output plz? Im not sure I understand the DD part? Do you just want a list of all A's? If so, have you considered looking at using filters on sheet1? If you just want a seperate table showing all A's (or whatever you select), we can, of course this with formulas...
    Your table...
    A
    B
    C
    D
    1
    Names Student Number Phone Number Present
    2
    Hank
    1111111111
    1111111111
    a
    3
    Tammy
    2222222222
    98765432
    p
    4
    Len
    33333333333
    9876543
    p
    5
    Amber
    4444444444
    23456789
    a
    6
    Tony
    5555555555
    34567890
    p
    7
    Bob
    666666666
    45678912
    a


    Extract table...
    G
    H
    I
    J
    K
    1
    Names Student Number Phone Number Present A
    2
    Hank
    1111111111
    1111111111
    a
    3
    Amber
    4444444444
    23456789
    a
    4
    Bob
    666666666
    45678912
    a


    K1=selection cell/drop-down
    G2=IFERROR(INDEX(A$2:A$7,SMALL(IF($D$2:$D$7=$K$1,ROW($A$2:$A$7)-1),ROWS($A$1:A1))),"")
    This is an ARRAY formula ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    copied down and across

  11. #11
    Registered User
    Join Date
    02-08-2015
    Location
    Australia
    MS-Off Ver
    2011
    Posts
    22

    Re: Selection from first Drop Down List determines information in the other cells

    Hi, yes. Basically i made an absence column. A is for absent and / is present. I put filters so the only students i can see are those with the A. How can i make only those with the A appear on the drop down on the following page? I want to elimate such an extensive list appearing on the next page (sheet2).

    Also Sheet2 is a sort of contact log, students must be contacted when they are absent. Is there a way to keep the sheets so that i can add on reasons for absence,so they can be absent on many different days, but how can i keep these sheets. It would be good if for every absent student it generated a sheet which is kept on a seperate tab.

    So, if i filter all the absent and present students and 2 are absent, then the sheet that appear on sheet2 is created twice ...i hope this makes sense, or maybe someone can suggest a better idea for this

    That array formula has me confused
    Attached Files Attached Files
    Last edited by rainbow612; 02-12-2015 at 12:57 AM.

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Selection from first Drop Down List determines information in the other cells

    Not sure where you want to put this, but copythis ARRAY formula down and acroos...
    =IFERROR(INDEX(Sheet1!A$2:A$7,SMALL(IF(Sheet1!$D$2:$D$7="A",ROW(Sheet1!$A$2:$A$7)-1),ROWS(Sheet1!$A$1:A1))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  13. #13
    Registered User
    Join Date
    02-08-2015
    Location
    Australia
    MS-Off Ver
    2011
    Posts
    22

    Re: Selection from first Drop Down List determines information in the other cells

    that only lists Tammy

    BTW any ideas on being able to generate and keep sheets for each absent person so i can go back and add more contact info at later dates?

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Selection from first Drop Down List determines information in the other cells

    Did you use CSE to enter?

    A
    4
    Names
    5
    Tammy
    6
    Len
    7


    BTW any ideas on being able to generate and keep sheets for each absent person so i can go back and add more contact info at later dates?
    If you are keeping a running data base, that should not be a problem

  15. #15
    Registered User
    Join Date
    02-08-2015
    Location
    Australia
    MS-Off Ver
    2011
    Posts
    22

    Re: Selection from first Drop Down List determines information in the other cells

    Yes the array worked...the curly brackets appeared...but the only name that appeared was Tammy, maybe its just me

    Can you elaborate on how to generate and keep sheets for each absent person?

    The array is still returning one result, not all the people who are absent just one....weird
    Last edited by rainbow612; 02-12-2015 at 07:42 AM.

+ 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. [SOLVED] Drop list selection determines another cells value, duplicates are possible
    By kramer64 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-04-2014, 07:20 PM
  2. Drop down list determines results in other cells
    By ArchaeoExcel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2013, 12:12 AM
  3. Information from a drop down list selection
    By Evander in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2013, 03:43 PM
  4. Autolock Cells from a Drop Down List Selection and a Calendar Selection
    By John Anderson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-04-2013, 10:54 AM
  5. drop down selection determines other drop down content
    By lskelton in forum Excel General
    Replies: 1
    Last Post: 11-02-2005, 06:17 PM

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