Trying to yield results only if a date is in between two dates

Options

=IF([Q1 End Date]1 > [Target Service Start Date]6 < [Q1 Start Date]1, "true", "false")

This is the formula I tried.

=IF([Target Service Start Date]6 <[Q1 End Date]1 > [Q1 Start Date]1, "true", "false")

I also tried this.. still not working.

I am trying to say if [Target Service Start Date] falls between [Q1 Start Date] and [Q1 End Date] then show 'true', if not show 'false'.

Let me know if anyone knows what I am doing wrong! Thanks!

Best Answer

Answers

  • Michael Culley
    Michael Culley ✭✭✭✭✭
    Answer ✓
    Options

    Try this:

    =IF(AND([Target Service Start Date]6 <[Q1 End Date]1,[Target Service Start Date]6 > [Q1 Start Date]1), "true", "false")

  • mtetzlaf
    Options

    This worked! Thankyou! It was a small part of a bigger formula.. Could you maybe help explain why this formula is giving me a blank cell and not a $0?

    =IF([Target Service Start Date]6 = "Red Badge", (([Remaining Q2 Budget]6 * 12) / 365) * [Q3 - days]@row, IF([Target Service Start Date]6 = "Blue Badge", (([Remaining Q2 Budget]6 * (1 + 0.45)) / 365) * [Q3 - days]@row, IF(OR([Target Service Start Date]6 = "Discretionary / Other", [Target Service Start Date]6 = "WPR / IT"), IF(AND([Q1 End Date]6 < [Q3 End Date]1, [Q1 End Date]6 > [Q2 End Date]1), IF([Q3 - days]6 = 0, 0, [Remaining Q2 Budget]6)))))

  • Michael Culley
    Michael Culley ✭✭✭✭✭
    Options

    you need to include the 0 at the end of your if statement.

    An if statement goes like this: If(A = B, "do this", "else do this")

    You didn't put the else part of your if statement. It should be where all the )))) are.

    I believe it goes before the last parenthese. Type ,0)

  • Michael Culley
    Michael Culley ✭✭✭✭✭
    Options

    If you don't include that, the if statement will just show as blank if none of the conditions are true.

  • Michael Culley
    Michael Culley ✭✭✭✭✭
    edited 10/06/22
    Options

    @mtetzlaf

    Sorry it goes before all those parenthesis. So ,0)))))