Indicating Each Month A Project Is Active?

Options

Community,

I'm struggling to indicate which months a project is active given a project start and end date. If a project starts on 09 January 2020 and ends on 09 March 2020, it would be active January, February, March. I would like to represent this as follows:

Showing that the project was active in its Start Month and End Month is easy (as in Projects A and B above). For example, I can use...

=IF(OR(MONTH([Project Start Date]1) = 1, MONTH([Project End Date]1) = 1), 1, 0)

...to do this for January.

Where i'm stuck is how to determine the intervening months (as in Projects C and D above). Any ideas?

Thanks in advance.

Best Answers

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    edited 01/09/20 Answer ✓
    Options

    @Paul Newcome Thanks for noticing the missing parenthesis. I edited my original post to include it.

    And you're right projects that extend over multiple years would be much more complicated, but I think that it could still be done by comparing the year and month. If you actually used the last date of the month you were checking against you could just compare the dates altogether.

    =IF(AND(Date(2019,02,1) >= [Project Start Date]@row, Date(2019,02,27) <= [Project End Date]@row, 1)

    @RK Are you looking at a year's work at one time or would this project extend over multiple years? IF my above solution works for you then please mark it as a correct answer.

Answers

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    edited 01/09/20
    Options

    Are you concerned about indicating the specific months? or are you more interested in getting a count of total months that a specific project was active? I could imagine that you could check to see if the current month number was greater than the start month number and less than the end date month number. 

    For February you could try something like

    =IF(AND(2 >= Month([Project Start Date]@row), 2 <= Month([Project End Date]@row), 1)

    If that works, then you could essentially do that for all the rest of the columns.

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    Options

    Yep, just tested out my theory. That will work for you. Just change the 2 to whichever month number that your are looking to add the 1 flag too.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Options

    I just realized my solution is pretty much the same as @Mike Wilday's. The only thing I would change for his would be fixing the second MONTH function to include the appropriate parenthesis.


    =IF(AND(2 >= Month([Project Start Date]@row), 2 <= Month([Project End Date]@row)), 1)


    Additionally this will only work if they project start and end are in the same year. If your dates have different years such as Dec. 2019 - March 2020, this will not work.

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    edited 01/09/20 Answer ✓
    Options

    @Paul Newcome Thanks for noticing the missing parenthesis. I edited my original post to include it.

    And you're right projects that extend over multiple years would be much more complicated, but I think that it could still be done by comparing the year and month. If you actually used the last date of the month you were checking against you could just compare the dates altogether.

    =IF(AND(Date(2019,02,1) >= [Project Start Date]@row, Date(2019,02,27) <= [Project End Date]@row, 1)

    @RK Are you looking at a year's work at one time or would this project extend over multiple years? IF my above solution works for you then please mark it as a correct answer.

  • RK
    RK
    edited 01/09/20
    Options

    @Mike Wilday and @Paul Newcome , thank you for your quick and elegant responses. I was over-complicating things in my head. Your outside view simplified things greatly.

    @Mike Wilday Projects will wrap across years, but I think your revised approach solves that for me (I can suffer the once-a-year administrative effort to create new columns).

    Thanks to you both!

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    Options

    Yes, the start date should be compared to the earliest date in the month. Glad we could help you see a result.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Options

    @Mike Wilday

    No worries. Parenthesis can be a pain sometimes.

    You also pulled a "Paul" and replicated my original formula with the only difference being the order you compared the dates in. Hahaha

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    Options

    @Paul Newcome Great minds think alike. And at close to the same speeds.

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Options

    @Mike Wilday I have noticed this. I was just sitting here laughing out loud at that other thread about pulling the most recent updated.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!