+ Reply to Thread
Results 1 to 28 of 28

Populate cells when Month is chosen in combobox for a specific name

  1. #1
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Populate cells when Month is chosen in combobox for a specific name

    Hi all,

    I wondered whether someone can point me in the right direction with this. I have a combobox that has a list of months, when a month is chosen in the combobox I require a formula to populate the values in each column for a specific name and the month chosen from a data sheet.

    I believe INDEX & MATCH will be able to do this however I cannot figure out how to link it with the combobox or how to populate all columns.

    Can anyone at least give me some pointers on this? A sample has been provided.


    Thanks guys!
    Last edited by SChapman; 05-14-2013 at 04:38 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    Please attach the file in this forum itself


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    I can't as it's too large

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    Add it in zip and attach it since you can attach upto 10 MB when the file is in zipped content, I believe.

  5. #5
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Oh I didn't realise that, I've edited my first post to contain the zip file

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    Please confirm how you would like to get the results? using formula or using code?

  7. #7
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    I would like to know how to do both if possible? If you don't have the time then formula please.

    Thanks Sixthsense

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    Instead of using combobox to select the Months, use Validation List (Data>>Validation>>List).

    In B11 Cell - Array Formula - Requires CTRL+SHIFT+ENTER
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copy B11 cell formula and paste it in C11 and D11 cells.

    In B27 Cell - Array Formula - Requires CTRL+SHIFT+ENTER
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copy B27 cell and paste it in C27 to K27 cells.

  9. #9
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Unfortunately I cannot use a validation list due to the font size :/

  10. #10
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Your formula works great, I've only just had chance to look at it. Thanks! How can I use this with a combobox or is it even possible?

  11. #11
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    In design mode do right click on the combobox and select PROPERTIES and in LINKED CELL provide output cell reference and locate that output cell in formula.

    Sent from mobile device so unable to show it in excel file

  12. #12
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Thanks for that Sixthsense. I've just had a thought, formulas may not work for what I require as I need the user to be able to enter the current months data then I am using a macro to copy it over the the data sheet. Obviously the current solution will prevent the user from being able to input any data into the cells.

    Does this mean it would have to be done using VB? :/

  13. #13
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Can anyone help with this?

  14. #14
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    bump (sorry)

  15. #15
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    Please show your file with combobox linked to a cell to proceed further

  16. #16
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    I've attached with the combobox & cells linked in.....

    Thanks again Sixthsense
    Last edited by SChapman; 05-14-2013 at 04:39 AM.

  17. #17
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    Please check the attached file for solution

    In Module1 code just reduce the number of lines 100000 to your data range for better and speedy performance.
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Thanks for taking the time to look at my problem Is it possible to have the data change automatically when a different month/year is chosen rather than using a macro?

    Can I just use the code under a worksheet_change sub instead?

  19. #19
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    I just changed the Form Combobox to ActiveX Combobox. Check the attachment for details.
    Attached Files Attached Files

  20. #20
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Excellent, thanks a lot!!!

  21. #21
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Hi Sixthsense,

    I am still having problems with this, I've extended your code so it populates the data in rows 11 to 22 & rows 27 to 38. Unfortunately when I choose February as the month & change it back to March only some of the rows populate the data. Is it possible you could take a look at the attached sheet?
    Last edited by SChapman; 05-14-2013 at 04:53 AM.

  22. #22
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Can anyone help with a solution for this?

  23. #23
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    I have now solved this, part of the formula I stupidly overlooked.

    Thanks again for all your help!!

  24. #24
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    Hi again Sixthsense,

    As discussed I've had to add a column & two rows, I came across a problem once I had it all working & that is if a name had changed from one month to the next it wouldn't find them as it is matching the actual name. So I thought it would be best to match a number rather than a name so the names can be variable from month to month.

    So, I've managed to get columns 2 to 5, row 11 to 24 working or at least they appear to be but I can't seem to get the correct data to appear in columns 2 to 11, rows 30 to 43.

    Do you mind having another look at the attached sample worksheet?
    Attached Files Attached Files

  25. #25
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    @ SChapman,

    Please try to understand us... it's really hectic one when you change the questions and ask to do changes with the suggested code/formula.

    Please plan everything while posting your initial thread itself and show the exact data by covering all your expectation instead of saying on Oh God It's Not Working With This Permutation after that Its Missing This Logic, I expected that it will run...

    Our suggestions vary based on the data you show to us and the criteria you supply to us.

    Now it's 24th post you are requesting for the change.... we do help but requesting to understand our situation too....

  26. #26
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    I do appreciate that and apologise but I didn't foresee this problem. In future I will try and prevent this happening :/

    I also appreciate your time and help with this.

  27. #27
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Populate cells when Month is chosen in combobox for a specific name

    Try this...

    Please Login or Register  to view this content.

  28. #28
    Forum Contributor
    Join Date
    02-01-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Populate cells when Month is chosen in combobox for a specific name

    I have changed it slightly & it appears to work now....

    Please Login or Register  to view this content.
    I will add more data & retest later today.

    Thanks Sixthsense!

+ 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