+ Reply to Thread
Results 1 to 13 of 13

Help to create table based on drop down list selection

  1. #1
    Registered User
    Join Date
    04-12-2021
    Location
    England
    MS-Off Ver
    13
    Posts
    6

    Question Help to create table based on drop down list selection

    So I have a table of three different conditions and need to create a summary table to reflect the entries in column A and the allocation (columns B, C or D) which is dependent on the condition selected in K1.

    For example if you select "Low" I want to be able to just have Product 1 and Product 3 appear, with their corresponding allocations although that part I reckon can be done with a simple VLOOKUP. The tricky part is getting the product in the table in the correct order with no gaps.

    Many thanks in advance.

    Dynamic table example.xlsx
    Last edited by ConfusedExpat; 06-30-2023 at 12:17 PM.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Help to create table based on drop down list selection

    Welcome to the forum.

    The Excel version in your profile is uncertain, so I assume it is 2013.

    Please try in J4:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Good luck!
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Help to create table based on drop down list selection

    J4
    =IFERROR(INDEX($A$1:$D$20,AGGREGATE(15,6,ROW($B$2:$D$20)/(INDEX($B$2:$D$20,,MATCH($K$1,$B$1:$D$1,0))<>""),ROW(1:1)),1),"")

    K4
    =IFERROR(INDEX($A$1:$D$20,AGGREGATE(15,6,ROW($A$2:$A$20)/(INDEX($A$2:$D$20,,MATCH($K$1,$A$1:$D$1,0))<>""),ROW(1:1)),MATCH($K$1,$A$1:$D$1,0)),"")

    both copied down.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-12-2021
    Location
    England
    MS-Off Ver
    13
    Posts
    6

    Re: Help to create table based on drop down list selection

    Thats awesome, many thanks.

  5. #5
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Help to create table based on drop down list selection

    You are welcome.

  6. #6
    Registered User
    Join Date
    04-12-2021
    Location
    England
    MS-Off Ver
    13
    Posts
    6

    Question Help to create table based on drop down list selection (again)

    Apologies for the second post as a few of you kindly answered my first one a few days ago but I created a bit of a hash of it as some bits were omitted and also I tried to translate what I was doing over two separate files and it didn't work.

    So I have a summary table in a file called "Scheme Sheet" of three different conditions to reflect the entries in "Master sheet" in column A and the allocation (columns B, C or D) which is dependent on the condition selected in "scheme sheet". Last time I had left the cells in the table that is now in "Master sheet" with nothing other than blanks when I in fact I should have put zeros in, however, the summary table in "scheme sheet" needs to ignore the zeros. Does that make sense?

    For example if you select "Low" I want to be able to just have Product 1 and Product 3 appear, with their corresponding allocations although that part I reckon can be done with a simple VLOOKUP. The tricky part is getting the product in the table in the correct order with no gaps.

    Many thanks again

    Scheme sheet.xlsx

    Master sheet.xlsx
    Last edited by ConfusedExpat; 07-03-2023 at 06:02 AM.

  7. #7
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Help to create table based on drop down list selection (again)

    Is there a reason/purpose for using two separate workbooks - why can't the two sheets be in the same workbook.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  8. #8
    Registered User
    Join Date
    04-12-2021
    Location
    England
    MS-Off Ver
    13
    Posts
    6

    Re: Help to create table based on drop down list selection (again)

    The Master sheet workbook is a centralised one that I don't have control over.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Help to create table based on drop down list selection (again)

    You can modify the formulas that Windknife gave you in post #3 of your previous thread replacing <>"" with <>0
    If you want the result to be in a separate workbook then cut cells J1:K10 from Sheet1 of the Dynamic table example workbook and paste them into a new workbook.
    Note that you will have to produce a list for the data validation drop down in cell K1 in the new workbook.
    The formulas in cells J4:K10 should automatically update.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  10. #10
    Registered User
    Join Date
    04-12-2021
    Location
    England
    MS-Off Ver
    13
    Posts
    6

    Re: Help to create table based on drop down list selection (again)

    Quote Originally Posted by JeteMc View Post
    You can modify the formulas that Windknife gave you in post #3 of your previous thread replacing <>"" with <>0
    If you want the result to be in a separate workbook then cut cells J1:K10 from Sheet1 of the Dynamic table example workbook and paste them into a new workbook.
    Note that you will have to produce a list for the data validation drop down in cell K1 in the new workbook.
    The formulas in cells J4:K10 should automatically update.
    Let us know if you have any questions.
    Ok, thanks, I shall give that go when I get back into the office on Monday and let you know how it goes.

  11. #11
    Registered User
    Join Date
    04-12-2021
    Location
    England
    MS-Off Ver
    13
    Posts
    6

    Re: Help to create table based on drop down list selection (again)

    It works a treat, many thanks again.

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Help to create table based on drop down list selection (again)

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

  13. #13
    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,910

    Re: Help to create table based on drop down list selection (again)

    Please note that you should NOT have created a new thread for this - you should have continued in the original thrread. Please don't duplicate threads in future (and please read the forum rules). Thanks.

    I have merged your two threads.
    Last edited by AliGW; 07-03-2023 at 07:42 AM.
    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] Extract Data from a table based on a selection from a drop down list (VBA)
    By Shantanutheway in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-20-2020, 07:43 PM
  2. Create name list from multiple sheets based on drop down selection
    By kelwea in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-28-2020, 02:09 AM
  3. View Table based on drop down list selection
    By wiseguy00 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-21-2018, 06:58 AM
  4. Replies: 10
    Last Post: 04-03-2018, 02:27 PM
  5. [SOLVED] VBA to Amend the Filter Selection on a Pivot Table Based on a Drop Down List
    By The_Snook in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-22-2017, 10:00 AM
  6. [SOLVED] create a drop down which allows multiple selection and change content of table based on th
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 08-16-2015, 06:12 AM
  7. Replies: 2
    Last Post: 07-15-2014, 08:24 PM

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