+ Reply to Thread
Results 1 to 14 of 14

Combining selections from drop-down lists into a separate drop-down list

  1. #1
    Registered User
    Join Date
    02-24-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003, 2007
    Posts
    9

    Combining selections from drop-down lists into a separate drop-down list

    Okay. I hope that someone will be able to help me. I'm desperate now!

    In one workbook, I have 2 worksheets (OBJECTIVES, ACTIVITIES).

    On both worksheets there is one field that is the same, which links the data on both (GROUPID).

    On the OBJECTIVES tab, there are 5 columns (not side-by-side) that have drop down selections in them (tied to each specific GROUPID, one row per GROUPID). At any point the selections may change.

    On the ACTIVITIES tab, there can be multiple rows with the same GROUPID (not in any particular order) since there will be mutliple activities per GROUPID. One column is the "objective" column.

    In this "objective" column on the ACTIVITIES tab, I need to have a drop down list that has all the selections chosen for that particular GROUPID from the OBJECTIVES tab. Each time that a GROUPID is added in another row (regardless of the order), I need the "objective" drop down field to reflect the chosen selections for that GROUPID (from the OBJECTIVES tab). Each activity needs an objective chosen; multiple activities can have the same objective chosen (and only those selected for that GROUPID to show up in the drop down list).

    I am absolutely stumped. I couldn't figure out how to combine selections into a new drop down list (while matching by a specific identifier).

    I hope that someone will be able to help me. Thank you!!!
    Attached Files Attached Files
    Last edited by SCIFINUT; 02-27-2012 at 06:06 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Combining selections from drop-down lists into a separate drop-down list

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook. Don't upload a picture when you have a workbook question. None of us is inclined to recreate your data. Upload the workbook and manually add an 'after' situation so that we can see what you expect. In addition clearly explain how you get the results..
    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'.
    To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.

    On this page, below the message box, you will find a button labelled 'Manage Attachments'.
    Clicking this button will open a new window for uploading attachments.

    You can upload an attachment either from your computer or from another URL by using the appropriate box on this page.
    Alternatively you can click the Attachment Icon to open this page.

    To upload a file from your computer, click the 'Browse' button and locate the file.

    To upload a file from another URL, enter the full URL for the file in the second box on this page.
    Once you have completed one of the boxes, click 'Upload'.

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-24-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003, 2007
    Posts
    9

    Re: Combining selections from drop-down lists into a separate drop-down list

    I do have a sample workbook with the 2 tabs. All objectives on the actual OBJECTIVES tab will be drop-down boxes (not shown in this file). Although the file is in 2007 format, the formula needs to work in 2003 as well. I hope that this helps. Thank you so much for your assistance!!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-24-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003, 2007
    Posts
    9

    Re: Combining selections from drop-down lists into a separate drop-down list

    I was just checking back to see if anyone was able to figure out the formula (or what is needed) for this to work. I truly hope that someone can help me. Thank you to anyone who is working on this! THANK YOU!!

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Combining selections from drop-down lists into a separate drop-down list

    Can you update your example ... provide an additional sheet which reflects the desired outcome based on the sample data.

    Regards, TMS

  6. #6
    Registered User
    Join Date
    02-24-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003, 2007
    Posts
    9

    Re: Combining selections from drop-down lists into a separate drop-down list

    Okay... I've spelled it out on the ACTIVITIES tab. The columns that are highlighted on the OBJECTIVES tabs contain the data (per GROUPID (which is highlighted as well)). I didn't create a drop down box of the example that would be in column F (in one field in the row with the corresponding GROUPID).

    Does this help? I appreciate your assistance.
    Attached Files Attached Files

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Combining selections from drop-down lists into a separate drop-down list

    To create drop down lists without VBA, the "range" of cells holding the values to display need to be congruent. I've added formulas in S:W on the Objectives sheet to pull all the objectives into a joined range for each row, so the drop downs can be created from there.

    Then I selected F2 (important step) before I created the named formula MyCodes (press Ctrl-F3 to view it). This dynamic formula is spotting the column A GroupID on the Objectives sheet, then offsetting to column S of that row, then displaying the values in those 5 columns on that row.

    Then Data Validation in column F is using the new MyCodes dynamic formula to display the results for each row. Notice there is no drop down in F2 because MOTOR is not on the Objectives sheet.

    Now that it is working, you can hide column S:W if you wish.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  8. #8
    Registered User
    Join Date
    02-24-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003, 2007
    Posts
    9

    Re: Combining selections from drop-down lists into a separate drop-down list

    Thank you so much for responding!!! I'm attempting to follow your instructions and duplicate it on the actual spreadsheet. When I press F2, it just enters me into the actual field (instead of double-clicking). Also, instead of the "S" column, in the actual spreadsheet, the "offset" will start in Column "AN"... will this affect the formula? Thanks.

  9. #9
    Registered User
    Join Date
    02-24-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003, 2007
    Posts
    9

    Re: Combining selections from drop-down lists into a separate drop-down list

    Okay! I figured out that the 18 in the formula will change to 39 since the actual linked field starts in column AN! It worked!

    Thank you! You are a genius!

    Is it possible to not show the zeros in the drop down box on the ACTIVITIES tab? Again, thank you!

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Combining selections from drop-down lists into a separate drop-down list

    What zeros? You'll have to show me the problem.

  11. #11
    Registered User
    Join Date
    02-24-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003, 2007
    Posts
    9

    Re: Combining selections from drop-down lists into a separate drop-down list

    On your speadsheet (and mine)... If nothing is chosen, the linked field shows a zero '0'. You can see this on the Objectives tab if you scroll down to the linked rows (starting with row 12, columns S-W) that have nothing in the original source fields. You can also delete a few of the selections in Column M or P. The corresponding linked field will show a zero.

    Again, thank you!
    Last edited by SCIFINUT; 02-27-2012 at 03:52 PM.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Combining selections from drop-down lists into a separate drop-down list

    This is not simple step up in complexity. The formula in S2 was:

    =D2

    ....and now, to suppress zeros and give drop down lists without zeros showing, the formula changes to the array formula:

    =IF(COUNTA($D2,$G2,$J2,$M2,$P2)<COLUMN(A$1), "", INDEX($A2:$P2, SMALL(IF(LEFT($A$1:$P$1,3)="OBJ", IF($A2:$P2<>"", COLUMN($A$1:$P$1), ""), ""), COLUMN(A$1))))

    ...confirmed by pressing CTRL-SHIFT-ENTER to activate the array.

    Then that cell is copied to the right. THEN, copy all 5 cells and paste downward.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    02-24-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003, 2007
    Posts
    9

    Re: Combining selections from drop-down lists into a separate drop-down list

    Wow... I am IMPRESSED!!!! I didn't mean for it to get complicated. Thank you so much!!! I need to bake you some cookies.

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Combining selections from drop-down lists into a separate drop-down list

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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