+ Reply to Thread
Results 1 to 6 of 6

Formula not calculating monthly "split" between range totals correctly

  1. #1
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Formula not calculating monthly "split" between range totals correctly

    Attached file 151025 UTILISATION MIX.xlsx shows employees start on 30% utilisation. After three months, it increases to 50%. After six months some grades increase to 70%.

    To establishes how many employees are on each "utilisation" level each month I tried the approach:

    Range J2 - U2 (This does not work correctly):
    =COUNTIF($B2:$B10,"<"&EOMONTH(J1,0))-COUNTIF($D2:$D10,"<"&EOMONTH(J1,0))-COUNTIFS($F$2:$F$10,"<>"&"",$F2:$F10,"<"&EOMONTH(J1,0))

    Counts everyone in Col B employed in that month (because everyone HAS to be on at least 30%).
    Deducts the number in Col D who are on 50% that month
    Deducts the "non blank" cells in Col F who are on 70% that month.
    Balance should be the number on 30%

    Range J3 - U3 (Works correctly):
    =COUNTIF($D2:$D10,"<"&EOMONTH(J1,0))-COUNTIFS($F$2:$F$10,"<>"&"",$F2:$F10,"<"&EOMONTH(J1,0))
    Counts the number in Col D on 50% that month
    Deducts the non-blanks in Col F on 70% that month.
    Balance is those on 50%

    Range J4 - U4 (Works correctly):
    =COUNTIFS($F$2:$F$10,"<>"&"",$F2:$F10,"<"&EOMONTH(J1,0))
    Counts the non-blanks in Col F on 70% that month.

    Hope someone can see the "hole in the pole" and guide me?

    Ochimus

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,175

    Re: Formula not calculating monthly "split" between range totals correctly

    How do you get 3 for August?

    If understand the calculation:

    30% =8
    50% = 5
    70% =1

    therefore 30% = 8 -5 -1 = 2

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Formula not calculating monthly "split" between range totals correctly

    Whyn not just do it this way...
    J2=COUNTIF($B2:$B10,"<"&EOMONTH(J1,0))-J3-J4
    J3=COUNTIF($D2:$D10,"<"&EOMONTH(J1,0))-J4
    both copied across

    edit: John, Aug 50% is not 5, it's 4...5 (50%) -1(70%)
    (I made the same mistakelol)
    Last edited by FDibbins; 10-25-2015 at 03:40 PM. Reason: corrected typo
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,175

    Re: Formula not calculating monthly "split" between range totals correctly

    Got it!!! Hence your approach.

  5. #5
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Formula not calculating monthly "split" between range totals correctly

    Thanks to both for the prompt responses, and above all for FD'S brutally simple solution. Well deserved Reputation point.

    (Reminds self to look up Occam's razor - AGAIN).

    Ochimus

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Formula not calculating monthly "split" between range totals correctly

    Ochimus, dont about Occam's razor (Among competing hypotheses, the one with the fewest assumptions should be selected.), I try and work on the KISS principle

    Thanks for the feedback

+ 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. If "6343" in cell A3 matches "monthly" in B3 show a "Y" in C3
    By laaxy in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-05-2014, 07:38 PM
  2. Replies: 1
    Last Post: 02-15-2014, 04:05 PM
  3. Replies: 1
    Last Post: 06-06-2013, 06:28 PM
  4. [SOLVED] Need Macro to compile data from "Weekly" sheets and sum up into "Monthly" summary sheet
    By mo4391 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2013, 07:25 PM
  5. Strings Variables in Range("A1").Formula = "=index/match" ?
    By nadnerb5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2012, 05:07 PM
  6. Replies: 2
    Last Post: 04-25-2012, 05:39 PM
  7. [SOLVED] How do I split "A1B2" into "A1" and "B2" using text to column fun.
    By Jennifer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2005, 06:06 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