Converting Excel formula to SharePoint Calculated column


  • I am trying to calculate the difference between two date and time, considering work hours (7:30 to 4:30, Monday to Thursday & 7:30 to 4:00 Friday) work days (Monday to Friday) and Holidays. I have and excel formula that works fine, but when i try it as a calculated column it returns 0. please i need help.

    See Excel formula below;

    =IF(OR(End Time<Start Time,Modified<Created),0,
    *IF(MOD(Created,1)>End Time,1,
    (MAX(Start Time,MOD(Created,1))-Start Time)
    /(End Time-Start Time)))
    *IF(MOD(Modified,1)<Start Time,1,
    (End Time-MIN(End Time,MOD(Modified,1)))
    /(End Time-Start Time))))
    *(End Time-Start Time)*24

    Start Time = Start of Work Hours

    End Time =  End of work Hours

    Created = Requests Creation Time

    Modified = Request Closure time

    HolidayList =  Predefined Holiday list

    See SharePoint formula below;

    IF(OR([End Time]<[Start Time],[Modified]<[Created]),0,
    *IF(MOD([Created],1)>[End Time],1,
    (MAX([Start Time],MOD([Created],1))-[Start Time])
    /([End Time]-[Start Time])))
    *IF(MOD([Modified],1)<[Start Time],1,
    ([End Time]-MIN([End Time],(MOD([Modified],1)))
    /([End Time]-[Start Time]))))
    *([End Time]-[Start Time])*24


    2018년 5월 18일 금요일 오전 8:36

모든 응답

  • Hi,

    If you want to calculate the working days between two dates, you can consider to use the formula below in SharePoint:


    More information:

    Calculate number of working days between two dates


    Best Regards

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    2018년 5월 21일 월요일 오전 9:03
  • Thanks, however the working hours is not working.
    2018년 5월 21일 월요일 오전 9:16