+ Reply to Thread
Results 1 to 12 of 12

Grouped items / Data Validation / Userform / Drop Down / VBA

  1. #1
    Registered User
    Join Date
    04-14-2012
    Location
    Paris, France
    MS-Off Ver
    Excel 2010
    Posts
    25

    Grouped items / Data Validation / Userform / Drop Down / VBA

    Hey guys,

    I've been trying to figure out a way how to be able to have a drop down menu that consists of "grouped items" i.e. items that fall under the same group/category; and once a group item/category has been selected, the individual items need to be automatically copied down on separate rows.

    I've attached my excel file consisting of two tabs: an item list and an estimate template. On the item list, you can see that column B designated as "Group Name" consists of several individual item names and also a "subtotal" item that needs to calculate the total price for that particular group name. My goal is to be able to formulate a way (either by a drop down list, data validation, or userform) to be able to select "Group Name" under the "Estimate" tab and then have all of its individual items as well as the subtotal pasted one after the other. I would also consider using check boxes to select group names.

    Any help or guidance on this would be highly appreciated,

    Thank you.

    Example.xlsx

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    Hi,

    Please take a look on the "Demonstration" worksheet in the attached workbook.

    Is this the sort of thing that you were looking for?

    Let me know

  3. #3
    Registered User
    Join Date
    04-14-2012
    Location
    Paris, France
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    Thank you for your help! That works perfect! Just one question, would it be possible to have the same drop down menu copied down the entire column F (under the tab "demonstration") so that if I selected the group "Main Office" it would show the individual items of that group + its subtotal; but then if I selected "Library" after that, I would have all the individual items of Library shown. In essence, the estimate contains more than more grouped items at the same time. I've tried tinkering with the formula but I don't want to mess it up! Also, how would I go about embedding this formula to a Userform dialogue? Thanks for all the help.

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    No problems.

    It is possible, but only if you will have a fixed number of items in each group. I'm sure there would be a very very long formula that could handle it, but I'm going to do my best to talk you out of asking me to write one, as it would take me quite a while to develop one, and I couldn't even guarantee that it would be perfect

    As for incorporating this into a UserForm, you wouldn't need the formulae. You could simply use a series of For...Next and/or If...Then loops to achieve the desired result. How would you be looking at displaying the data on the UserForm? In a ListView control? Let me notch up a ListView for you and show you what I mean...I'll be back in a little bit

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    OK, it's pretty rough at the moment, but hopefully you get the idea.

    Let me know

  6. #6
    Registered User
    Join Date
    04-14-2012
    Location
    Paris, France
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    Hello Ajryan,

    That's more than enough to get me started. Thank you so much for all the help.

    Cheers

  7. #7
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    You're welcome

    Please don't forget to mark this thread as solved

  8. #8
    Registered User
    Join Date
    07-29-2017
    Location
    Lima
    MS-Off Ver
    Office 16
    Posts
    1

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    Hi. I have this very same question but I don't know where the attached workbook with demonstration tab is. I can only see the example.xlsx

  9. #9
    Registered User
    Join Date
    07-13-2019
    Location
    Argentina
    MS-Off Ver
    2010
    Posts
    1

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    Hola a todos,
    Soy nueva en el grupo y no encuentro la modificación que hicieron para que el trabajo quede resuelto.
    Podrán indicar en donde se encuentra el archivo corregido?
    Gracias!!

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    Hola Nandom,

    ˇBienvenido al foro!
    No veo el archivo corregido. Le pediré a ajryan88 que vuelva a publicar el archivo.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  11. #11
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    Hello ajryan88,

    I do not see the file you posted earlier. Please repost the workbook so everyone can follow what has happened.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Grouped items / Data Validation / Userform / Drop Down / VBA

    That was in 2014, so a heck of a lot earlier! It’s been a long day ...
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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] Userform and multiple search criteria with drop down validation for 2003.
    By Spreadlover in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2013, 08:19 PM
  2. [SOLVED] Data Validation - 2 items for the same drop box
    By KimStarbase in forum Excel General
    Replies: 6
    Last Post: 10-29-2005, 09:05 AM
  3. Data Validation: items in one list relate to items in another
    By Paul D. Simon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2005, 05:05 PM
  4. Replies: 1
    Last Post: 06-24-2005, 12:21 AM
  5. Length of a Validation Items drop down choices
    By Darin Kramer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2005, 10:06 AM

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