Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2014

    Unanswered: Exclude when the current month EXCEPT when?

    Does anyone know how to INCLUDE the month of May or June data when the current month is May and if the current month is June but all other months exclude the "current" month?

    I'm working with
    to exclude current month, however I need ALL months when the current month is May or current month is June. Meaning only in the month of May or month of June I need the <>Month(Date()) to NOT take affect.

    <>Month(Date()) and (Month(Date()) Not In (5,6))
    does not work, it results in Null
    <>Month(Date()) and (Month(Date()) In (5,6))
    does not work, it also results in Null

    There has to be a way to do this, anyone know the correct formula?

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    Consider using an IIF clause. That takes the form
    iif(<logical test>, <expression if True>, <expression if false>)
    The logical test is anything that results in a boolean result, it can be as simple or complex as you require. Use bracketing to group elements if the same logic branch together along with AND / Or / NOT keywords.
    The result of the logic test determines which expression to use.
    You can use compound IIF statements to handle complex requirements. Eg
    Iif(gender = 'm', iif (..., T,F),f)
    Be warned debugging compound IIF'S is a pain.
    Search for details if IIF on line
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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