+ Reply to Thread
Results 1 to 5 of 5

Formula to Allocate Cost every week according to the number of days in a week

  1. #1
    Forum Contributor
    Join Date
    06-03-2004
    Location
    India
    MS-Off Ver
    2013
    Posts
    205

    Formula to Allocate Cost every week according to the number of days in a week

    Hello All,
    I am using Excel 2010 and have attached a sample of my problem
    I wish to have a formula in the yellow colored cells in my sample attached.

    The formula should check the number of days in a week and allot per day cost accordingly.
    I have done S.No. manually for explanation purpose.

    Thanks in advance for any help

    Rashid Khan
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Formula to Allocate Cost every week according to the number of days in a week

    So a new week starts on a Friday? E.g. from Friday to Thursday?

    If you would calculate it by weeknumber (Mon-Sun), this would work:

    G5: =SUMPRODUCT(--(WEEKNUM($C$5-1+ROW(INDIRECT("1:"&$E5)))=WEEKNUM(G$3))*$F5)

    and copy across.

    Cheers,
    berlan

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,452

    Re: Formula to Allocate Cost every week according to the number of days in a week

    In G5:

    Please Login or Register  to view this content.
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Drag down and accross.
    Quang PT

  4. #4
    Forum Contributor
    Join Date
    06-03-2004
    Location
    India
    MS-Off Ver
    2013
    Posts
    205

    Re: Formula to Allocate Cost every week according to the number of days in a week

    Dear Berlan
    Yes
    Week starts from Fri to Thursday
    Your formula gives zero for the first value eg G5

  5. #5
    Forum Contributor
    Join Date
    06-03-2004
    Location
    India
    MS-Off Ver
    2013
    Posts
    205

    Re: Formula to Allocate Cost every week according to the number of days in a week

    Sorry bebo for the late reply.
    My laptop had some issues..
    Your formula works.
    But I did not get an answer from Berlan
    Thanks

+ 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. allocate costs into matrix based on week number
    By avdbos in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-28-2015, 04:09 PM
  2. Replies: 5
    Last Post: 09-01-2014, 03:55 PM
  3. Replies: 7
    Last Post: 05-02-2013, 06:48 AM
  4. Receiving a date week by week depends on specific number?
    By ExcelBG in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-27-2013, 10:20 AM
  5. Replies: 14
    Last Post: 02-15-2012, 10:23 AM
  6. Replies: 3
    Last Post: 02-23-2010, 03:47 PM
  7. Translate ~Number of days in a week to number of days across months
    By martin ridley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2008, 01:09 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