+ Reply to Thread
Results 1 to 9 of 9

Populate Combo box with Index/Match using horizontal headers

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Populate Combo box with Index/Match using horizontal headers

    Hi,
    I'm having a bit of difficulty in populating a desired list through the use of a combo box, I'm hoping someone here has he smarts to help me.
    We have a training register to show the mandatory training required per position, I would like the user to select the position from the combo box & underneath the mandatory training for that position will appear.
    Data is in a table, copied below (I can't upload here for some reason?). So in the combo box I have linked it to a vertical list of the positions, CEO, OPs Mgr etc, I can see them in the combo list. Ideally then if someone could help with a formula to index the position, find all the X's in that column & change the X's to the training in the course name column. I really hope this makes sense but if not please ask away!
    So from example below if a user selects Chief Executive Officer in the combo box then underneath the combo box we should see Staff Safety Induction, General Construction Induction & nothing else.

    Course Name Chief Executive Officer Operations Manager Office Manager
    Staff Safety Induction X X X
    General Construction Induction X X
    Provide first aid (HLTAID003) O
    Provide cardiopulmonary resuscitation O

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Populate Combo box with Index/Match using horizontal headers

    Can't you just find the column for the position, then go down that column and where there's an X change it to the value in the first column on the same row?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Populate Combo box with Index/Match using horizontal headers

    Hi Norie,
    Thanks for the reply.
    So I have a combo box on the first sheet that lists all the positions, when a user selects a position from the list I would like the mandatory training for that position listed underneath.
    So I though I would have to use an index/match formula but if you have a better solution absolutely I would be interested to try it.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Populate Combo box with Index/Match using horizontal headers

    Little confused.

    In your first post you have this,
    Quote Originally Posted by EimearC
    find all the X's in that column & change the X's to the training in the course name column
    but nothing about populating a combobox.

  5. #5
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Populate Combo box with Index/Match using horizontal headers

    Hi,
    Sorry for any confusion, it is in the first line of my original thread that I wish it to be populated through a combo box.
    GRARG05 Uploaded.xlsx
    I have attached the file here, hopefully that should clear any confusion
    So you see I have tried a few copied & pasted index formulas but it's too complicated for my current excel level.

    Many thanks

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Populate Combo box with Index/Match using horizontal headers

    Don't know how you could do it with formulas but you could use code like this.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Populate Combo box with Index/Match using horizontal headers

    Thank you so much, that looks perfect, I've just tried to plug it in & I'm getting an object error on the 'idx = ComboBox1.ListIndex'.
    Would it have anything to do with I have the list names as GRATitles & that's not in the code anywhere? Maybe it doesn't need to be?
    Maybe do I need to declare the ComboBox or anything ie Dim Combobox1 as...?

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Populate Combo box with Index/Match using horizontal headers

    Where did you put the code?

    It should go in the module of the worksheet the combobox is on.

    You can access that by right clicking the combobox and selecting View Code.

  9. #9
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Populate Combo box with Index/Match using horizontal headers

    I put it directly into a new module in the workbook, changed it to the Combobox code, worked a treat, you're a genius!
    Many thanks!!

+ 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. Horizontal Sum Index Match
    By AliveNThisMoment in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-05-2015, 08:47 AM
  2. [SOLVED] Transposing data from vertical to horizontal (INDEX/MATCH)
    By johnmitch38 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2015, 07:05 PM
  3. Index Match with Horizontal and Vertical Matches
    By KMCurtis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2014, 04:18 PM
  4. [SOLVED] SUM multiple columns with veritical & horizontal match(index)?
    By Prodschdler in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-25-2013, 01:24 PM
  5. Replies: 5
    Last Post: 02-29-2012, 08:51 PM
  6. Returning headers using index match
    By dmr316 in forum Excel General
    Replies: 2
    Last Post: 12-03-2009, 12:53 PM
  7. Index Match Multiple Colums Headers
    By smigom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2008, 04:49 AM

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