+ Reply to Thread
Results 1 to 16 of 16

Drop Down list Condition

  1. #1
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Red face Drop Down list Condition

    Hi

    Can someone help me out on Drop down list restriction.. I have listed out my requirement also provided snapshot. Please assist me. Thanks.

    1. I have Country Airports in column D and their respective cities in Column E and my cities drop down is located in column K.

    2. If i update china in column J then Column K should reflects only the China Cities.

    3. Also if there are no multiple cities for the given country then it should automatically takes the single value in column K without any drop down.




    Attachment 684218
    Attached Files Attached Files
    Last edited by Revathi kannan; 06-26-2020 at 03:04 PM.

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Drop Down list Condition

    Why snapshot and not the file itself?

  3. #3
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Re: Drop Down list Condition

    Sorry, i am not able to attach files since that option doesn't works for me..

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Drop Down list Condition

    Maybe you are doing something wrong.
    Look at the instructions at the top of the page, in the yellow banner.

  5. #5
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Re: Drop Down list Condition

    Attached my file..Thanks for your assistance.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,864

    Re: Drop Down list Condition

    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  7. #7
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Re: Drop Down list Condition

    Hi Alan,

    Thanks for your time but i am not familiar with VBA. I thought of to fix my above requirements using excel functions.

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,864

    Re: Drop Down list Condition

    Here is a non VBA solution. If you google "Cascading Combo Boxes Excel" you will find other alternative solutions out there.

    https://mauriceausum.com/2011/07/12/...oxes-in-excel/

  9. #9
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Drop Down list Condition

    Hi,
    you should use a helper, in Column G (drag down)

    =IFERROR(INDEX($E$1:$E$9,AGGREGATE(15,6,(ROW($E$2:$E$9))/($J$2=$D$2:$D$9),ROWS($G$1:G1))),"")

    In Data validation use:
    =OFFSET($G$2,,,MATCH("",$G$2:$G$9,)-1)
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    06-25-2020
    Location
    India
    MS-Off Ver
    2019
    Posts
    4

    Re: Drop Down list Condition

    Hi,

    1. Arrange the Airport column to keep the same countries one below another. (Ref. attachment)

    2. Use the following formula in data validation.
    =OFFSET($C$3,MATCH($E6,$B$3:$B$10,0)-1,0,COUNTIF($B$3:$B$10,$E6))

    3.You get the result
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Re: Drop Down list Condition

    Hi Belinda,

    Thanks for your help. It works perfectly but my 3rd point is not working.

    For example: If i select Airport with one cities, it should not come under drop down the Column K should auto fill it since it has only one cities.
    Example: If i select India in Column J then Column K should auto fill as "Chennai" wherein i do want to use drop for the single city.

  12. #12
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Re: Drop Down list Condition

    Hi Dolphin,

    Thanks for your help.. but my 3rd requirement is not working wherein as per your attachment if i type "India" in Column E it should auto fill the cell as "Chennai" in Column F since it has only one city so i don't need use drop down there. Is it possible.

  13. #13
    Registered User
    Join Date
    06-25-2020
    Location
    India
    MS-Off Ver
    2019
    Posts
    4

    Re: Drop Down list Condition

    Hi Revathi,

    I don't think it is possible. But I will try to find a solution for that.

  14. #14
    Forum Contributor
    Join Date
    06-01-2015
    Location
    Chennai,India
    MS-Off Ver
    Microsoft Office 2021
    Posts
    146

    Re: Drop Down list Condition

    Thank you for your time Dolphin.

  15. #15
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105
    Hi
    Dont think also it is possible , maybe in vba which I am not prificient in.

  16. #16
    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,460

    Re: Drop Down list Condition

    There is a way, however once a selection has been made, it will not work again.

    In C3 copied down:

    =IFNA(IF(COUNTIF($B$3:$B$10,$E3)=1,INDEX($C$3:$C$10,MATCH(E3,$B$3:$B$10,0)),""),"")
    Attached Files Attached Files
    Last edited by AliGW; 06-27-2020 at 03:01 AM. Reason: Simplified solution.
    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] Rotate List of names bottom to top Repeat without condition with option to set a condition
    By spyac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-05-2018, 05:17 PM
  2. Replies: 16
    Last Post: 04-26-2018, 04:18 AM
  3. Replies: 1
    Last Post: 05-20-2017, 10:29 AM
  4. Replies: 0
    Last Post: 10-14-2014, 08:39 AM
  5. [SOLVED] Selecting a table based on drop down list condition
    By bos1234 in forum Excel General
    Replies: 23
    Last Post: 02-21-2014, 04:18 PM
  6. Replies: 1
    Last Post: 06-19-2013, 12:49 AM
  7. Replies: 3
    Last Post: 04-16-2012, 10:14 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