+ Reply to Thread
Results 1 to 12 of 12

Need help - calculating daily, weekly, and monthly totals based two dates and networkdays

Hybrid View

  1. #1
    Registered User
    Join Date
    07-31-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Need help - calculating daily, weekly, and monthly totals based two dates and networkd

    Were you able to take a look at my response to your question?
    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Need help - calculating daily, weekly, and monthly totals based two dates and networkd

    Ive been looking at it, no doubt its possible within a formula its just an awkward one because you have this period of "free days" as such. Its getting the logic of how that works which is causing the issue.

    No doubt it'll be something fairly simple but not got it yet!
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Need help - calculating daily, weekly, and monthly totals based two dates and networkd

    Add this function and then call it (referncing your Days cell) from the Months cell. ie in J13 put =CalcMonths(E13)
    Function CalcMonths(inDays)
    outMonths = 0
    outweeks = 0
    outdays = 0
    Do Until inDays = 0
        outdays = outdays + 1
        Select Case outdays
            Case Is = 3
                outweeks = outweeks + 1
                outdays = -1
            Case Is > 5
                outdays = 0
            End Select
            Select Case outweeks
            Case Is = 3
                outMonths = outMonths + 1
                outweeks = 0
                outdays = -11
        End Select
        inDays = inDays - 1
    Loop
    If (outdays < 0) Then
    outdays = 0
    End If
    
    CalcMonths = outMonths & ":" & outweeks & ":" & outdays
    End Function
    Can you test that to see if it gives right results? we can then look at the format of output from there.

  4. #4
    Registered User
    Join Date
    07-31-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Need help - calculating daily, weekly, and monthly totals based two dates and networkd

    You've gone quite a ways over my head here, but I think I'm following you.
    I added in the function, and the output is now in J13.
    I would guess the next step is to somehow separate these outputs into the appropriate cells within the function code? I'm not real familiar with VBA code, so I'm open to next step suggestions.
    Thanks again.
    Attached Files Attached Files

+ 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. summing daily weekly & monthly totals
    By jrtaylor in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-10-2014, 04:49 PM
  2. Replies: 3
    Last Post: 10-01-2013, 05:05 AM
  3. [SOLVED] How do I group daily totals into weekly/monthly/quarterly totals
    By situationroom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-28-2013, 09:58 AM
  4. Replies: 0
    Last Post: 12-03-2012, 05:17 PM
  5. Calculate Totals weekly and Monthly from daily Figures
    By mfjanoo in forum Excel General
    Replies: 3
    Last Post: 03-05-2012, 03:06 PM
  6. Replies: 1
    Last Post: 07-11-2008, 05:57 AM
  7. Collecting weekly and monthly totals from daily data
    By Kasper in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-12-2006, 04:10 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