+ Reply to Thread
Results 1 to 3 of 3

Split days of the month if new month begins

  1. #1
    Registered User
    Join Date
    08-07-2006
    Posts
    11

    Split days of the month if new month begins

    In cells A1:G1 I have days of the week and in cells A2:G2 I have the days of the month. In cells A3:G3 I have time worked each day. Cell H3 has total time worked from the 30th-31st days since its another month. Cell I3 has the total time worked from the 1st-5th days of the new month. Since a new month has started during this week the times have to be split. If during the week there is no new month, times wont need to be split up and the sum of A3:G3 would go into cell H3 and cell I3 would be blank.

    ---A1---B1---C1---D1---E1---F1---G1-------H1------I1--
    1-SAT--SUN--MON--TUE--WED--THUR-FRI------------------
    2-30---31---01---02---03---04---05-------------------
    3-2.5--2.0--3.5--1.5--1.0--2.5--2.0------4.5-----10.5

  2. #2
    Bob Phillips
    Guest

    Re: Split days of the month if new month begins

    In H3 use

    =SUM(A3:INDEX(A3:G3,1,IF(MIN(IF(B2:G2<A2:F2,COLUMN(B2:G2)))=0,7,MIN(IF(B2:G2
    <A2:F2,COLUMN(B2:G2)))-1)))

    which is an array formula, it should be committed with Ctrl-Shift-Enter, not
    just Enter.

    I3 just becomes

    =SUM(A3:G3)-H3

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "azdps" <[email protected]> wrote in
    message news:[email protected]...
    >
    > In cells A1:G1 I have days of the week and in cells A2:G2 I have the
    > days of the month. In cells A3:G3 I have time worked each day. Cell H3
    > has total time worked from the 30th-31st days since its another month.
    > Cell I3 has the total time worked from the 1st-5th days of the new
    > month. Since a new month has started during this week the times have to
    > be split. If during the week there is no new month, times wont need to
    > be split up and the sum of A3:G3 would go into cell H3 and cell I3
    > would be blank.
    >
    > ---A1---B1---C1---D1---E1---F1---G1-------H1------I1--
    > 1-SAT--SUN--MON--TUE--WED--THUR-FRI------------------
    > 2-30---31---01---02---03---04---05-------------------
    > 3-2.5--2.0--3.5--1.5--1.0--2.5--2.0------4.5-----10.5
    >
    >
    > --
    > azdps
    > ------------------------------------------------------------------------
    > azdps's Profile:

    http://www.excelforum.com/member.php...o&userid=37199
    > View this thread: http://www.excelforum.com/showthread...hreadid=570165
    >




  3. #3
    Registered User
    Join Date
    08-07-2006
    Posts
    11

    Thumbs up

    thanks bob.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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