+ Reply to Thread
Results 1 to 9 of 9

Network Days, IF statements, Updates

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Network Days, IF statements, Updates

    Good afternoon, I'm hoping you can help.

    I have started creating a staffing salary sheet however I have become stuck on part of the project and I'm not sure if EXCEL is capable of carrying out this function.

    I have attached the sheet and hopefully the explaination of what I'm attempting to achieve is clear.

    When a start date is entered and end date is entered, the sheet will calculate what the monthly salary should be between the months. I have managed to this this accross the year Apr 2013 to March 2014, however when the dates entered are between March 2013 and June 2013 the calculation fails.

    Ultimately what I would like to happen is when you enter the start date and end date (eg: between 17th March 2013 and 3rd June 2013), the sheet calculates the salary for those months and every else should be £0.00.

    Apologies if this is not clear enough. I have included an attachment in the hope what I have said become clear.

    Cell G11 = Start date of employee - Cell H11 = End date of employee

    Cell W11 = Total Salary

    Cells Z11 to AK11 = Months Apr 2013 to Mar 2014

    Many thanks for your help everyone.

    Regards.
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Network Days, IF statements, Updates

    Will W11 always show annual salary or just the amount payable for the period entered?
    Audere est facere

  3. #3
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Network Days, IF statements, Updates

    HI mplange,

    welcome to the forum.
    however when the dates entered are between March 2013 and June 2013 the calculation fails.
    Can you show what you are expecting using an example, I already found formulas there and hence not sure what you wanted to achieve. Thanks.


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Network Days, IF statements, Updates

    Quote Originally Posted by daddylonglegs View Post
    Will W11 always show annual salary or just the amount payable for the period entered?
    If it's the former then try this formula in Z11 copied across and down

    =$W11/261*MAX(0,NETWORKDAYS(MAX($G11,AK$10),MIN($H11,EOMONTH(AK$10,0))))

    where 261 is an approximation for working days in a year

    ......or for the latter......

    =$W11/NETWORKDAYS($G11,$H11)*MAX(0,NETWORKDAYS(MAX($G11,AK$10),MIN($H11,EOMONTH(AK$10,0))))

  5. #5
    Registered User
    Join Date
    04-09-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Network Days, IF statements, Updates

    Hello and many thanks for replying so quickly!!!!

    W11 always show just the amount payable for the period entered.

    Regards.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Network Days, IF statements, Updates

    OK, then you should be able to use that second version

    =$W11/NETWORKDAYS($G11,$H11)*MAX(0,NETWORKDAYS(MAX($G11,AK$10),MIN($H11,EOMONTH(AK$10,0))))

    It takes the amount in W11 and divides by the number of working days in the whole G11 to H11 period to get an amount payable per working day - it then multipies that amount by the number of working days that fall within each calendar month and which are also within the G11 to H11 period

  7. #7
    Registered User
    Join Date
    04-09-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Network Days, IF statements, Updates

    Good afternoon DILIPandey.

    Please ignore some of the formula's in cells, I was trying different formulas to come to a solution. Please see example attached of what I'm trying to achieve (cells Z11 to AK11 and Z12 to AK12).

    Many thanks.

    Regards.
    Attached Files Attached Files

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Network Days, IF statements, Updates

    Sorry, my formula was referencing the wrong cell, try this in Z11 copied across and down

    =$W11/NETWORKDAYS($G11,$H11)*MAX(0,NETWORKDAYS(MAX($G11,Z$10),MIN($H11,EOMONTH(Z$10,0))))

  9. #9
    Registered User
    Join Date
    04-09-2013
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Network Days, IF statements, Updates

    Hello Daddylonglegs.

    Thank you very much for your help.

    The formula has worked and I am now able to continue with the project. This has inspired me to work harder on my EXCEL skills and expand my knowledge.

    Brilliant!!!!!!!

+ 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