+ Reply to Thread
Results 1 to 4 of 4

Splitting days in a week over a calendar month

  1. #1
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Splitting days in a week over a calendar month

    Hi All,

    This is a tricky one to explain but i'll try my best (working example attached albeit not automated).

    So i'm using the weekday formula to allocate hours worked per day into weekly columns via sumif's - this is working ok.

    Now the challenge comes in for weeks that falls over a calendar month end/start.

    I'd like to be able to split out the day's within the week which straddles the two months, as per my example 2 days in Apr and 3 days in May. This would mean that the last week of apr will be light and the first week of may will be heavy.

    Hope this makes sense and still toying with the idea of using this method or not but keen to hear your thoughts on this problem
    Attached Files Attached Files
    Last edited by Gti182; 08-17-2019 at 04:55 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Splitting days in a week over a calendar month

    Hi GTI,

    Excel Pivot Tables has this covered. You group by dates and make the group length of 7 days. See the attached.

    Weekly Allocation by days Group by 7 days.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Splitting days in a week over a calendar month

    Try this formula in A2 and copy down.

    =IF(B2<>0,B2-WEEKDAY(B2,3)+(MONTH(B2)<>MONTH(B2-WEEKDAY(B2,3)))*7,"")

  4. #4
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    455

    Re: Splitting days in a week over a calendar month

    Both of those solutions work great, thanks MarvinP & Phuocam!

+ 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. [SOLVED] Assigning Hours to Days of the Week for a Calendar
    By alfont1120 in forum Excel General
    Replies: 5
    Last Post: 06-27-2019, 11:38 AM
  2. [SOLVED] Formula to calculate working days and calendar days per month-year ?
    By donny007 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-05-2018, 06:23 PM
  3. Replies: 1
    Last Post: 10-11-2018, 10:56 AM
  4. Replies: 2
    Last Post: 10-03-2016, 08:35 AM
  5. Days of the month and week based on name month/year
    By RickMcc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-01-2016, 03:22 PM
  6. Calendar VBA auto filling week and month based on calendar entry.
    By perrymagic in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2011, 02:00 PM
  7. Calendar Week of Month
    By longfisher in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-10-2007, 07:09 AM

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