Data Validations And Filtercopy Macro

  • I am using a modified version of Debra Dalgleish's filtercopy macro in which 3 data validations are being used (she used 1 in her downloadable example and it works just fine when the validations are used in order as they should be. However, in looking over the data I am trying to present in my report I think it would be very valuable to use the first and third validations at times (skipping the 2nd) to discern information in that way. Long story short, I can't seem to get this to work and don't know if it's even possible because I'm not a VBA expert. Can someone here look at this code and tell me if it would be possible to modify this code to add this functionality?

    Thank you in advance for any advice/help!

  • Re: Data Validations And Filtercopy Macro

    You're just asking if the first and third conditions (IF-statements) could be used without using the second? I don't see why not.

    However, I'm not too sure here what condition you'd like applicable in this case, as you didn't specify any.

    Here's a general example with the code given:

    So if cell A1 has the contents of the cell as anything other than "DoNotSkip" (without quotes), the code will ignore the second IF-statement.

  • Re: Data Validations And Filtercopy Macro

    How about adding 2 buttons to your worksheet menu bar and assign these macro's

    where the first would call all the validations and the second judt calling the first and third, and put the code below in a module of its own

    none of this is tested but it may give you some insight as to the way forward.


  • Re: Data Validations And Filtercopy Macro

    Thank you both for your input! I have actually tried both approaches but could not previously get them to work. I chose MrkFrrl's approach to try again and with some modification got it to work this time. Here's what I ended up with:

    Thanks for pointing me in the right direction. This is a wonderful place to come when your mind is stuck in neutral.


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!