+ Reply to Thread
Results 1 to 15 of 15

Create a dependant drop down list based on multiple entries with the same name

Hybrid View

  1. #1
    Registered User
    Join Date
    04-14-2019
    Location
    Sydney, Australia
    MS-Off Ver
    MAC 365
    Posts
    21

    Exclamation Create a dependant drop down list based on multiple entries with the same name

    Hi all,

    I have a spreadsheet (see attached) that has multiple formulas used.

    At the moment there is 2 sheets:

    - Guest Stays

    - Current Approvals

    I populate 'Guest Stays' each time a guest stays at the property. Currently I have a drop down list for the name that draws from the 'Current Approvals' Sheet and automatically populates approval number, expiry date etc.


    On the Current Approvals sheet, any one person can have multiple approvals with different expiry dates and approval numbers at any one time.

    What I would like to do is:


    Using the 'Guest Stays' sheet have a drop down list for the Guest Name (column B) that then makes the Approval Expiry (column C) turn in to another drop down list showing all approval expiry numbers related to that specific person from the 'Current Approvals' sheet so that you can choose which one you would like to use for that stay.

    Is this possible? I appreciate your help so much!

    Thanks

    Heidz
    Last edited by AliGW; 11-15-2019 at 04:21 AM. Reason: Attachment removed.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Create a dependant drop down list based on multiple entries with the same name

    Maybe I'm missing something but isn't this just a case of filtering the Approvals sheet for the name you want? I can't see why the Guest Stays sheet needs to be involved.

    Otherwise please show a before and after situation, using a new sheet to show the results you and explaining what actions you've taken to arrive at the results.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    04-14-2019
    Location
    Sydney, Australia
    MS-Off Ver
    MAC 365
    Posts
    21

    Re: Create a dependant drop down list based on multiple entries with the same name

    On the sheet I have provided, the approval expiry dates are all different on the Current Approvals.

    1. The actual spreadsheet I am using contains personal data so I cannot share it due to that. The sheet i have provided it loosely based on it with the same kind of information. It is exactly the same with less people

    2. The Approval Expiry in 'Guest Stays' is not carrying over properly from 'Current Approvals' when choosing a guest. As you can see in 'Current Approvals' all expiry dates are different for the same person.

    It is not a case of filtering, I feel like I explained what I was trying to do pretty well. Just wanted to know if it is possible and also since checking the spreadsheet why when I choose a name the expiry dates does not bring over correctly either.

    What I would like to do as I said in my initial post is create a dependant drop down in the 'Guest Stays' sheet starting with:
    - Guest Name (drop down list of names in 'Current Approvals'
    - Approval Expiry (drop down list of all the expiry dates attached to that persons name in 'Current Approvals)
    Last edited by heidzhaydz; 05-08-2019 at 06:41 AM.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,847

    Re: Create a dependant drop down list based on multiple entries with the same name

    If I understand perhaps this will help.
    On the Current Approvals sheet distinct list of names (column K) is populated using:
    Formula: copy to clipboard
    =IFERROR(IF(MATCH(0,INDEX(COUNTIF(K$1:K1,A$2:A$16),,),)>COUNTA(A$2:A$16),"",INDEX(A$2:A$16,MATCH(0,INDEX(COUNTIF(K$1:K1,A$2:A$16),,),))),"")

    Data validation for the Guest Name column on the Guest Stays sheet uses the source: =OFFSET('Current Approvals'!$K$1,1,0,SUMPRODUCT(--('Current Approvals'!$K$2:$K$16<>"")),1)
    A new named range, Expiry_Date_2 has the Refers To as:
    Formula: copy to clipboard
    =OFFSET(Table2[[#Headers],[Expiry Date]],MATCH('Guest Stays'!A3,Table2[Participant Name],0),0,COUNTIF(Table2[Participant Name],'Guest Stays'!A3))

    The data validation for the Approval Expiry column uses the source: =Expiry_Date_2
    Let us know if you have any questions.
    Last edited by AliGW; 11-15-2019 at 04:22 AM. Reason: Attachment removed.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    04-14-2019
    Location
    Sydney, Australia
    MS-Off Ver
    MAC 365
    Posts
    21

    Re: Create a dependant drop down list based on multiple entries with the same name

    Hi there JeteMc,

    Thanks so much for your reply. It seems to work somewhat, however when I choose a different expiry date - it does not relay and change the information in the approval number.

    I am thinking this whole request may not be possible.

    Thanks for your help though!

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,847

    Re: Create a dependant drop down list based on multiple entries with the same name

    That is because the VLOOKUP is only finding the first approval number assigned to the corresponding name in column B.
    Replace the formula in C3 (Guest Stays sheet) with:
    Formula: copy to clipboard
    =IF(ISBLANK(B3),"",INDEX(RP_Approval,AGGREGATE(15,6,(ROW(RP_Approval)-ROW(Table2[[#Headers],[RP/Approval '#]]))/(Table2[Participant Name]=B3)/(Expiry_Date=C3),1)))

    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    04-14-2019
    Location
    Sydney, Australia
    MS-Off Ver
    MAC 365
    Posts
    21

    Re: Create a dependant drop down list based on multiple entries with the same name

    It won't let me put the formula in C3 of Guest stays, says it is invalid.

    Sorry! Should i be putting that formula in a different one?

  8. #8
    Registered User
    Join Date
    04-14-2019
    Location
    Sydney, Australia
    MS-Off Ver
    MAC 365
    Posts
    21

    Re: Create a dependant drop down list based on multiple entries with the same name

    Oh E3! I think I have it. Thank you soo much!!

  9. #9
    Registered User
    Join Date
    04-14-2019
    Location
    Sydney, Australia
    MS-Off Ver
    MAC 365
    Posts
    21

    Re: Create a dependant drop down list based on multiple entries with the same name

    Hi JeteMc,

    I am just testing out the sheet, if I add a new approval to the current approvals sheet - will this all automatically to the defined name list.

    It seems when I inset a row and add a new approval within the sheet it creates a space in defined name list. Not sure how too get around this

    Thanks again
    Last edited by heidzhaydz; 05-13-2019 at 03:06 AM.

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,847

    Re: Create a dependant drop down list based on multiple entries with the same name

    Lets try replacing the formula in cell K2 and down (Current Approvals sheet) with:
    Formula: copy to clipboard
    =IFERROR(IF(MATCH(0,INDEX(COUNTIF(K$1:K1,Table2[Participant Name]),,),)>COUNTA(Table2[Participant Name]),"",INDEX(Table2[Participant Name],MATCH(0,INDEX(COUNTIF(K$1:K1,Table2[Participant Name]),,),))),"")

    If there is a name in the Participant Name cell of the new row then the formula should work. If not, please upload a sample demonstrating the issue.
    Let us know if you have any questions.

  11. #11
    Registered User
    Join Date
    04-14-2019
    Location
    Sydney, Australia
    MS-Off Ver
    MAC 365
    Posts
    21

    Re: Create a dependant drop down list based on multiple entries with the same name

    Thanks that's great!

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,847

    Re: Create a dependant drop down list based on multiple entries with the same name

    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
    Registered User
    Join Date
    04-14-2019
    Location
    Sydney, Australia
    MS-Off Ver
    MAC 365
    Posts
    21

    Re: Create a dependant drop down list based on multiple entries with the same name

    I cannot seem to edit my post to remove the attachment...any advice?

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,324

    Re: Create a dependant drop down list based on multiple entries with the same name

    For what reason do you wish to remove the attachment? You should not be sharing anything that should not be shared on a public forum, and we expect sample workbooks to stay in place as a part of the thread. You will need a very good reason for us to agree to removing it.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  15. #15
    Registered User
    Join Date
    04-14-2019
    Location
    Sydney, Australia
    MS-Off Ver
    MAC 365
    Posts
    21

    Re: Create a dependant drop down list based on multiple entries with the same name

    Desensitised version of spreadsheet example attached
    Attached Files Attached Files

+ 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. Replies: 5
    Last Post: 02-26-2016, 12:59 PM
  2. Replies: 8
    Last Post: 11-16-2014, 06:34 PM
  3. Using Data VAlidation to create a list dependant on multiple rows?
    By Seangsmith in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-29-2014, 05:20 AM
  4. Replies: 2
    Last Post: 07-10-2012, 05:17 AM
  5. Replies: 3
    Last Post: 07-06-2010, 05:30 AM
  6. Value for text entries from dependant drop down list
    By BakerD in forum Excel General
    Replies: 2
    Last Post: 02-19-2009, 09:36 AM
  7. [SOLVED] multiple item entries from drop-down list
    By sgoldstand in forum Excel General
    Replies: 3
    Last Post: 05-24-2006, 01:30 PM

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