+ Reply to Thread
Results 1 to 5 of 5

Adding on call hours for different days

  1. #1
    Registered User
    Join Date
    10-11-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Adding on call hours for different days

    I am trying to calculate on call hours. The problem is that from Sunday to Wednesday it is 5 hours and from Thur to Sat it i s 4 hours. I got it to add regular on call at 4 hours but can't seem to make it add in the 5 hour diff. I have so far this formula...
    =COUNTIF(B4:Q4,"D-C")*4+COUNTIF(B1:Q4,"E-C")*4
    The D-C is day on call and the E-C eve on call value.

    Can anyone figure out a way to make it check to see if it's Sun to Wed and make it add 5 instead of four?

    Thanks
    Last edited by Antennas; 10-11-2011 at 07:59 PM.

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

    Re: Adding on call hours for different days

    So where are the days specified? Do you show dates or just text like "Sat" or 2Saturday"?
    Audere est facere

  3. #3
    Registered User
    Join Date
    10-11-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Adding on call hours for different days

    Sorry I should have realized you would need that sorry. I will attach what I have so far.
    The days are just listed in one row and the date in another.
    Attached Files Attached Files

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

    Re: Adding on call hours for different days

    Try this version for V4 copied down

    =SUM(COUNTIFS(B4:Q4,{"D-C";"E-C"},B$1:Q$1,{"Su","Mo","Tu","We","Th","Fr","Sa"}&"*")*{5,5,5,5,4,4,4})

  5. #5
    Registered User
    Join Date
    10-11-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Adding on call hours for different days

    Thanks very much I had not thought of doing it that way at all. Of course I am just learning these formulae though too. Thanks for the learning tip. I will dissect that code and see how it works.

    Thanks again!!

    Andrew

+ 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