+ Reply to Thread
Results 1 to 6 of 6

Counting percentage of month with multiple conditions

Hybrid View

  1. #1
    Registered User
    Join Date
    01-09-2019
    Location
    Seattle, Washington
    MS-Off Ver
    Microsoft Office 2016
    Posts
    4

    Counting percentage of month with multiple conditions

    I'm attempting to calculate the percentage of a month that my employees contribute to each month based on their hire date and termination date and am running in to struggles. I've included a number of IF statements to do so, but am looking for guidance on the best practice for this. It seems that no matter what formula I use, I can only get a piece of the data needed and not all.
    • Percentage of month employed based on hire date and termination date
    • Increments of 25%

    First time poster on any forum, so I apologize for any lacking in communication and am happy to answer clarifying questions.


    Any guidance would be greatly appreciate!!
    Attached Files Attached Files
    Last edited by MrExcelsior; 01-11-2019 at 02:04 PM. Reason: Problem solved

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,893

    Re: Counting percentage of month with multiple conditions

    My attachment in Post #2 of this thread:

    https://www.excelforum.com/excel-for...-segments.html

    works out the number of days in each month for stays in hospital. Perhaps you can gain some insight from this and apply it to your own requirements.

    Hope this helps.

    Pete

  3. #3
    Spammer
    Join Date
    01-08-2015
    Location
    Cali, Colombia
    MS-Off Ver
    365
    Posts
    302

    Re: Counting percentage of month with multiple conditions

    Hi, to all!

    You can try:
    =MROUND(MAX(,MIN(EOMONTH(E$1,0),MAX($C2:$D2))-MAX(MIN($C2:$D2),E$1)+1)/30,0.25)

    And drag it down and right. Blessings!

  4. #4
    Registered User
    Join Date
    01-09-2019
    Location
    Seattle, Washington
    MS-Off Ver
    Microsoft Office 2016
    Posts
    4

    Re: Counting percentage of month with multiple conditions

    johnmpl: This works quite well and simplifies my original formula considerably, but do you have any suggestions on the formula if the end date (column D) is blank? This would represent employees who are still active and contributing.

  5. #5
    Spammer
    Join Date
    01-08-2015
    Location
    Cali, Colombia
    MS-Off Ver
    365
    Posts
    302

    Re: Counting percentage of month with multiple conditions

    Hi, again!

    You can try then:
    =MROUND(MAX(,MIN(EOMONTH(E$1,0),MAX($C2,IF($D2,$D2,TODAY())))-MAX(MIN(IF($C2,$C2,TODAY()),$D2),E$1)+1)/30,0.25)

    Blessings!

  6. #6
    Registered User
    Join Date
    01-09-2019
    Location
    Seattle, Washington
    MS-Off Ver
    Microsoft Office 2016
    Posts
    4

    Re: Counting percentage of month with multiple conditions

    Thank you! I threw in an IF statement and that did the trick.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Multiple conditions in counting
    By jduffy0920 in forum Excel General
    Replies: 2
    Last Post: 07-07-2015, 06:40 PM
  2. Counting with multiple conditions
    By liln5k in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-11-2014, 08:10 PM
  3. Counting with multiple conditions
    By BradDenton in forum Excel General
    Replies: 8
    Last Post: 05-31-2012, 03:37 PM
  4. Counting multiple Conditions
    By Joeysparrow in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-09-2012, 08:50 PM
  5. multiple conditions counting
    By bruzzer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-02-2010, 02:45 PM
  6. Counting multiple conditions
    By Sippy69 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-10-2008, 09:12 PM
  7. Counting with multiple conditions
    By Littleoladywho in forum Excel General
    Replies: 4
    Last Post: 09-19-2007, 04:40 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1