+ Reply to Thread
Results 1 to 19 of 19

Populate cells based on category chosen

  1. #1
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Populate cells based on category chosen

    Hello Experts Please help me with the below task

    The attached file has on two sheets, the first sheet named inventory list has on inventory items that will go into recipes. These inventory items are assigned to specific categories.
    On the sheet named “Recipes” when I select a category from the drop down list located in cell A19:A28. I need to see all the inventory items belonging to that category in the drop down list under the heading “Recipe Inventory” located in cells D19:D28.

    Example: when I select the category “chicken” in cell A19 I need to see in the drop down list in cell D19 all the inventory items belonging only to the Chicken Category so I can make my selection. After I have selected the inventory item from the drop down list, I need column ‘C’ (item Code), Column ‘E’ (Recipe Unit Price ) & Column ‘G’ (Recipe Unit) to be populated with the data for that item. All these data are found on the sheet named “Inventory list”


    Thank You
    Teddy
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,504

    Re: Populate cells based on category chosen

    I think this would work for you in D19 of Recipes tab BUT you have to remove the dropdown selection from that cell first.
    =IFERROR(INDEX('Inventory List'!D:D,AGGREGATE(15,6,ROW('Inventory List'!$D$7:$D$92)/('Inventory List'!$C$7:$C$92=Recipes!$A$19),ROWS($1:1))),"")
    dragged toward down until it returns blank.

    EDIT: try it in I19 and drag down and you'll see how it works.
    Last edited by Sam Capricci; 11-21-2019 at 04:16 PM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Populate cells based on category chosen

    Here's another approach.
    I created a helper column to list all choices that previous message would create [different formula but same result].
    This allows you to select the item in correct drop down menu.
    Only thing I didn't see was where you get the quantity.

    See the attached file.

    Formulas used:

    Q1 (Array formula)
    HTML Code: 

    C19
    HTML Code: 
    Attached Files Attached Files
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  4. #4
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Populate cells based on category chosen

    Thanks for replying. Unfortunately this is not what i want
    Let me try and be clear as to what i want. When i select a category i need to see all the inventory items in the drop down box belonging to that category. It must also be in the same line.
    So if i select chicken in A19 then in D19 i need to see in the drop down box,all the inventory items belonging to the chicken category so i can make my selection.

    If i select another category in a next row then i need to see all items for that category in column D of the same row etc.
    example if i select the category Fries in A20, then in D20 i need to see in the drop down box all the items belonging to the Fries category.

  5. #5
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Populate cells based on category chosen

    Hi Modytrane. thanks for replying.
    I should tell you that any row the category is selected in then the corresponding row in column D must show you in the drop down box all the items belonging to that category. example if in cell A20 i select the category Fries then in cell D20 the drop down box must show me all the items belonging to the Fish category.
    This wiil be the same scenario for each row under the inventory category (A19:A28) and D19:D28)

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,629

    Re: Populate cells based on category chosen

    named ranges used:
    Beef ='Inventory List'!$B$29:$M$30
    Buns ='Inventory List'!$B$44:$M$48
    Cheese___Other_Dairy ='Inventory List'!$B$44:$M$48
    Chicken ='Inventory List'!$B$31:$M$38
    Drinks ='Inventory List'!$B$20:$M$28
    Fish ='Inventory List'!$B$39:$M$43
    Fries ='Inventory List'!$B$71:$M$73
    Inventory_Items ='Inventory List'!$D$7:$D$92
    Item_Code ='Inventory List'!$B$7:$B$92
    Other___Food ='Inventory List'!$B$74:$M$83
    Paper___Packaging ='Inventory List'!$B$84:$M$92
    Produce___Vegetable_Items ='Inventory List'!$B$60:$M$70
    Seasonings___Condiments ='Inventory List'!$B$7:$M$19
    Unit_Cost ='Inventory List'!$L$7:$L$92
    units ='Inventory List'!$M$7:$M$92

    data validation in column D:
    Please Login or Register  to view this content.
    c19: =IFERROR(INDEX(Item_Code,MATCH($D19,Inventory_Items,0)),"")
    E19: =IFERROR(INDEX(Unit_Cost,MATCH($D19,Inventory_Items,0)),"")
    G19: =IFERROR(INDEX(units,MATCH($D19,Inventory_Items,0)),"")
    Attached Files Attached Files
    Ben Van Johnson

  7. #7
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Populate cells based on category chosen

    Experts

    If i select any category in cell A19, then in D19 the drop down box must show me all the inventory items relating to that category. eg: if i select category chicken then in D19 drop down box must show me all chicken inventory items.

    This principle will be the same for all rows in the Inventory category range A19 to A28
    So If i select any category in cell A20 then in D20 the drop down box must show all inventory items relating to that category.

    The same thing must happen for Cell A21, A22, A23, A24, A25, A26, A27 & A28

    I hope i am a bit clearer

  8. #8
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Populate cells based on category chosen

    Hi Protonl,

    When i select the category "Other Food" the items belonging to this category is not displayed in the Drop down box in column D

  9. #9
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,629

    Re: Populate cells based on category chosen

    I revisit tomorrow...

  10. #10
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Populate cells based on category chosen

    ok. this should do what you want. just added few more columns to create new lists.
    same formulas as before.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Populate cells based on category chosen

    Hello Modytrane, Thanks again for replying

    The problem i am having with your formula is that when i add new inventory items to any category on the Inventory list sheet and select that category on the Recipe Sheet, nothing appears in the Drop down Box for that category.

    I need to be able to add new items on the Inventory list sheet and see it in the drop down box when i select that category on the Recipe Sheet

    Please see if you can sort this issue out for me.

    Thanks,
    Teddy

  12. #12
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Populate cells based on category chosen

    ok. I expanded the formula to include up to row 200 on the inventory list.
    so you can add more items.
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Populate cells based on category chosen

    if you have a problem, please be specific and describe what you are doing.
    i.e. where you're adding item or attach a sample file with the problem.

  14. #14
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Populate cells based on category chosen

    Thanks Modytrane . I will test the file and be more specific.

  15. #15
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Populate cells based on category chosen

    Modytrane,

    i have tested the file. Your formula work but i should have told you that i will need to copy the entire section that you have worked on (A17: H30) to different sections on the Recipe Sheet also be able to copy it to another sheet if possible. So i want to be able to use it as a Template.

    That is the only issue i now have. Once this is sorted out everything will be ok. Please see example in attached file.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Populate cells based on category chosen

    Any Success on this issue

  17. #17
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Populate cells based on category chosen

    Formula in Q1:Z19 refer to the where the list is.

    HTML Code: 
    you'll have to change the highlighted text to wherever those values are.

    See attached file.
    Attached Files Attached Files

  18. #18
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Populate cells based on category chosen

    =IFERROR(INDEX('Inventory List'!$D$1:$D$200,SMALL(IF('Inventory List'!$C$1:$C$200=$A$37,ROW($A$1:$A$198),""),ROW(1:1))),"")

  19. #19
    Registered User
    Join Date
    12-04-2010
    Location
    Jamaica
    MS-Off Ver
    Excel 2003
    Posts
    92

    Re: Populate cells based on category chosen

    Please be more clear when you say "you'll have to change the highlighted text to wherever those values are"

+ 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] Can I auto-populate a list from another table based on a shared category?
    By Freddy! in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-04-2019, 06:43 AM
  2. Chart - Category Label Disappears if the 1st Category not chosen
    By RebeccaD747 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-04-2019, 11:52 PM
  3. Narrowing or Expanding Questions listed based on category(s) chosen
    By OVacctng in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-21-2016, 12:17 PM
  4. Replies: 12
    Last Post: 01-13-2015, 09:30 AM
  5. [SOLVED] Form items chosen in Listbox to populate specific cells in spreadsheet
    By floydian in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-14-2013, 07:48 AM
  6. [SOLVED] Populate cells when Month is chosen in combobox for a specific name
    By SChapman in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 05-17-2013, 06:14 AM
  7. Populate ListBox Based On Item Chosen In Another ListBox
    By davemojo82 in forum Excel General
    Replies: 1
    Last Post: 08-04-2009, 08:39 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