Trap when Filter returns nothing

  • Hi,


    For sure the Forum can help you out :)


    Could you summarize your general situation ... and explain the main obstacle you are facing ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Thanks Carim,


    Basically I am applying a column filter then adding a value to an adjacent column


    I problem I am having is when the filter returns no value the code still adds a value to the adjacent column


    This creates a new task line


    The code I need help with is if the filter returns no values to skip to next filter block


    I cannot upload a Project file so have added some code below


  • Hi again,


    Given the fact you do need to trap when Filter returns nothing, the best solution is to have your UserDefinedFunction

    see :

    How To Trap when Autofilter returns nothing
    I couldn't really figure out how to title this, but here's a bit more in depth description. I have created a VBA code which will filter an excel file based on…
    stackoverflow.com

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Carim

    Changed the title of the thread from “MS Project VBA” to “Trap when Filter returns nothing”.
  • You are welcome :)


    Thanks for your Thanks AND for the Like 8)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

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