+ Reply to Thread
Results 1 to 10 of 10

CountIf Multiple functions

  1. #1
    Registered User
    Join Date
    09-01-2013
    Location
    Hermiston, Oregon
    MS-Off Ver
    Office 365
    Posts
    14

    CountIf Multiple functions

    I am trying to find an easier way for the below formula.

    1. Going down Column C I have different scheduled positions
    2. Going across the Rows I have days 1 through 31
    3. So Cell C5 is the 1st day of the month, D5 2nd day of the month and so on.
    4. Each day is required 3 shifts of 8 hours for a total of 24 hours so the default in all the cells is 24
    5. A penalty is held against us for any shift (8 hours) that is not completed 100%
    6. 1 Point for any eight hour shift not fully completed so if we only completed 16 hours we would get 1 point penality, anything less than 8 hours would be 2 points and zero hours would be 3 points.

    Also some of the people doing the data entry will use the space bar to clear the field instead of deleting it.
    The below formula works but I feel like there should be an easier way.

    Also I have some positions that are only 16 hours a day and some that are only 8 hours a day.


    ##=COUNTIF(C5:AG5,"<=8")+COUNTIF(C5:AG5,"<=16")+COUNTIF(C5:AG5,"")+COUNTIF(C5:AG5,"")+COUNTIF(C5:AG5,"")+COUNTIF(C5:AG5," ")+COUNTIF(C5:AG5," ")+COUNTIF(C5:AG5," ")##

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,430

    Re: CountIf Multiple functions

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-01-2013
    Location
    Hermiston, Oregon
    MS-Off Ver
    Office 365
    Posts
    14

    Re: CountIf Multiple functions

    Ok, I think I have attached the file.
    Attached Files Attached Files

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: CountIf Multiple functions

    why do you have multiples of the same formula in your string?

    =COUNTIF(C5:AG5,"<=8")+COUNTIF(C5:AG5,"<=16")+COUNTIF(C5:AG5,"")+COUNTIF(C5:AG5,"")+COUNTIF(C5:AG5,"")+COUNTIF(C5:AG5," ")+COUNTIF(C5:AG5," ")+COUNTIF(C5:AG5," ")
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  5. #5
    Registered User
    Join Date
    09-01-2013
    Location
    Hermiston, Oregon
    MS-Off Ver
    Office 365
    Posts
    14

    Re: CountIf Multiple functions

    It was the only way I knew to get three counts if the cell was blank. As an example if the cell calls for 24 hours and we did zero hours the cell would be blank and the multiple formula strings end up counted three times, 1once for each 8 hour shift.

  6. #6
    Registered User
    Join Date
    09-01-2013
    Location
    Hermiston, Oregon
    MS-Off Ver
    Office 365
    Posts
    14

    Re: CountIf Multiple functions

    Again the 24 = 3 shifts of 8 For each 8 hour period we do not fill it counts as 1 point. An empty cell would need to be counted as 3 points.

    Keep in mind, I am NOT considered an experienced user of formulas so I'm sure there is a better way, that is why I posted the question.

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: CountIf Multiple functions

    certain positions you don't want to count for saturdays or sundays?

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: CountIf Multiple functions

    And are the numbers in AK4:AK14 the correct counts?

  9. #9
    Registered User
    Join Date
    09-01-2013
    Location
    Hermiston, Oregon
    MS-Off Ver
    Office 365
    Posts
    14

    Re: CountIf Multiple functions

    Some positions (rows) are 7 days a week and some are Monday through Friday

  10. #10
    Registered User
    Join Date
    09-01-2013
    Location
    Hermiston, Oregon
    MS-Off Ver
    Office 365
    Posts
    14

    Re: CountIf Multiple functions

    Yes they are, I have it working with the posted formula. I was just trying to see if there is a cleaner way of doing it. I have 5 other locations with schedules that are close but vary in hours, so I am trying to find the best way to do it.

+ 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. Need help with multiple COUNTIF functions
    By eugenoel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-27-2015, 10:43 PM
  2. Multiple Functions IF, AND, COUNTIF, MATCH
    By Ron Coderre in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-06-2005, 07:05 PM
  3. [SOLVED] Multiple Functions IF, AND, COUNTIF, MATCH
    By Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  4. [SOLVED] Multiple Functions IF, AND, COUNTIF, MATCH
    By Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. [SOLVED] Multiple Functions IF, AND, COUNTIF, MATCH
    By Ron Coderre in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  6. [SOLVED] Multiple Functions IF, AND, COUNTIF, MATCH
    By Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. [SOLVED] Multiple Functions IF, AND, COUNTIF, MATCH
    By Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

Tags for this Thread

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