+ Reply to Thread
Results 1 to 7 of 7

Calculation work only on weekdays and not weekends

  1. #1
    Registered User
    Join Date
    09-22-2015
    Location
    NL
    MS-Off Ver
    7
    Posts
    14

    Calculation work only on weekdays and not weekends

    For my work I need to calculate workhours from 00:00 to 7:00 and from 19:00 to 24:00.

    The hours from 7:00 to 19:00 o’clock should not be calculated. On weekdays ( Monday to Friday) he’s does calculate it perfectly, but whene I will calculate the hours who are made in a weekend ( Saturday and Sunday) does the code not working

    I have attached an example where you can clearly see that the workdays will be calculated and not the weekend

    In the example, I have also inserted a text field, where I think the code give’s an error.
    Please Login or Register  to view this content.
    Maybe someone has an idea where or why the code goes wrong when it is calculated in a weekend.

    Thanks

    paul
    Attached Files Attached Files

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

    Re: Calculation work only on weekdays and not weekends

    If you just want the same calculation across all 7 days then remove the IF part of the formual

    Please Login or Register  to view this content.
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    09-22-2015
    Location
    NL
    MS-Off Ver
    7
    Posts
    14

    Re: Calculation work only on weekdays and not weekends

    Sorry pjwhitfield, this code give's an error, but thanks any way

    Quote Originally Posted by pjwhitfield View Post
    If you just want the same calculation across all 7 days then remove the IF part of the formual

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-20-2016
    Location
    bhopal
    MS-Off Ver
    2003
    Posts
    17

    Re: Calculation work only on weekdays and not weekends

    U r using weekday limit <6

    correct it there

    ALS(WEEKDAG(E10;2)<8

    good luck

  5. #5
    Registered User
    Join Date
    09-22-2015
    Location
    NL
    MS-Off Ver
    7
    Posts
    14

    Re: Calculation work only on weekdays and not weekends

    Hello adm.patrikpl,

    That code "ALS(WEEKDAG(E10;2)<8" is working, but whene there is no date ( E10) recorded , he will calculated automatic 7:00 hours. but he may only calculate hours if there are filled a date and a start and end time

  6. #6
    Banned User!
    Join Date
    10-29-2012
    Location
    Europe
    MS-Off Ver
    2013, 2016
    Posts
    318

    Re: Calculation work only on weekdays and not weekends

    TRy this:

    =MAX(0;MIN($V$7;I10)-MAX($T$7;G10))

    I think is about your regional settings...

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

    Re: Calculation work only on weekdays and not weekends

    Quote Originally Posted by paulvanrijn View Post
    Sorry pjwhitfield, this code give's an error, but thanks any way
    it works fine for me but I think IndiRa is right, your regional settings must use ; instead of ,

+ 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. Replies: 3
    Last Post: 06-28-2016, 11:21 AM
  2. [SOLVED] SUMIFS for weekdays/weekends
    By Davzx in forum Excel General
    Replies: 5
    Last Post: 09-27-2015, 11:56 AM
  3. Calculate based on weekdays & weekends
    By Ichigo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2015, 12:37 AM
  4. Turning weekends into weekdays?
    By bobing in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-16-2013, 06:34 AM
  5. WEEKENDS VS. WEEKDAYS
    By TLAngelo in forum Excel General
    Replies: 0
    Last Post: 07-10-2006, 02:04 PM
  6. WEEKENDS VS. WEEKDAYS
    By TLAngelo in forum Excel General
    Replies: 7
    Last Post: 05-12-2006, 12:35 PM
  7. IF statement with Weekends vs. weekdays
    By edwardpestian in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2006, 04:13 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