Results 1 to 10 of 13

Thread: Dependent Drop Down Lists

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    OK, I think I understand now.
    In your last post, post #9, you gave basically the same explanation as in your very first post, post #1,
    The small difference is that instead of a range A1:E8 we now have a range A25:G27
    So you already have the coding for that, you just need to change the ranges appropriately

    The coding would take this sort of form….

    _____ If Application.Intersect(Target, Me.Range("A26:A27,C26:C27")) Is Nothing Then
    ‘ code like before with ranges adjusted appropriately



    Now I see we basically have 3 extra ranges. In other words, we are really just doing the same thing again another 3 times




    Quote Originally Posted by msiyab View Post
    Will it be too complicated?
    I don’t think it is particularly complicated. In basic terms you are doing the same thing again 4 times instead of 1 time.
    There is no real new complications:
    So you did it once, and can do it again ( and again and again and again !!! )

    Quote Originally Posted by msiyab View Post
    ... I feel it would be a real tedious task...
    I suppose writing coding is always a bit tedious.
    It is not too bad in your particular requirement because we have a lot of very similar coding. We can do a lot of copying ( Ctrl+c ) and pasting ( Ctrl+v ) . After that you need to make minor changes to ranges.




    There are two basic ways that I see to do this

    Way 1

    The macro would look basically like this , and be approximately 4 times as long as previously:
    _____ If Application.Intersect(Target, Me.Range("A26:A27,C26:C27")) Is Nothing Then
    ‘ code like before with ranges adjusted appropriately


    _____ If Application.Intersect(Target, Me.Range("A29:A30,C29:C30")) Is Nothing Then
    ‘ code like before with ranges adjusted appropriately


    _____ If Application.Intersect(Target, Me.Range("A32:A33,C32:C33")) Is Nothing Then
    ‘ code like before with ranges adjusted appropriately


    _____ If Application.Intersect(Target, Me.Range("A35:A36,C35:C36")) Is Nothing Then
    ‘ code like before with ranges adjusted appropriately



    Way 2

    This might require you to slightly reorganise your Advise data so that different sections are at similar offsets to each other

    We would then have a macro very similar to the previous starting something like this

    _____ If Application.Intersect(Target, Me.Range("A26:A27,C26:C27, A29:A30,C29:C30, A32:A33,C32:C33, A35:A36,C35:C36")) Is Nothing Then
    ‘ code like before with ranges determined by an offset. This offset will vary according to which of the 4 main ranges were selected


    Way 2 would be a shorter code, but would take a bit more brain work to figure out the logic


    I expect if I was in your position, I would do it in Way 1. There are no real advantages of Way 2
    There are no problems with having a macro 4 times as long as the previous one, and you don’t need to type it all,
    since you can get most of it by copying ( Ctrl+c ) and pasting ( Ctrl+v ) what you already have.





    I am not sure how I can help further?

    Tell me if you want me to make a start for you as I did before.


    Alan
    Last edited by DocAElstein; 11-12-2020 at 04:05 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

  2. #2
    Member
    Join Date
    Jun 2012
    Posts
    80
    Rep Power
    14
    Quote Originally Posted by DocAElstein View Post
    I am not sure how I can help further?

    Tell me if you want me to make a start for you as I did before.


    Alan
    Yes please. Could you help me by starting it off for me like you had done previously. I will try the copy pasting and minor adjustments from where you leave it. Once its done on the file I have shared, i will try it on my original file.

    I'd really appreciate the effort.

Similar Threads

  1. Dynamic Dependent Dropdown List Filter
    By william516 in forum Excel Help
    Replies: 2
    Last Post: 07-09-2013, 09:21 PM
  2. Replies: 7
    Last Post: 04-22-2013, 01:41 PM
  3. dropdown lists in headings by using Filter
    By Dane in forum Excel Help
    Replies: 3
    Last Post: 01-24-2013, 11:08 PM
  4. Dependent Data Validation (Using Only Formulas)
    By Admin in forum Download Center
    Replies: 2
    Last Post: 10-18-2011, 03:14 PM
  5. Data Validation Dependent Dropdowns
    By Admin in forum Download Center
    Replies: 0
    Last Post: 04-10-2011, 03:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •