+ Reply to Thread
Results 1 to 5 of 5

Count number of occurrences based on criteria in multiple columns and rows

  1. #1
    Registered User
    Join Date
    03-31-2007
    Posts
    21

    Count number of occurrences based on criteria in multiple columns and rows

    Looking for a formula that will count number of occurrences based on criteria in multiple columns and rows. Please refer to attached sheet.
    Attached Files Attached Files

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Count number of occurrences based on criteria in multiple columns and rows

    Hello,

    If I understand correctly, you want to count the number of OTs that are greater than 0 in each row. What name that row belongs to is not really affecting this. Starting in row 5 and copied down, this formula

    =COUNTIFS($C$4:$Q$4,"OT",C5:Q5,">0")

    Will produce the numbers you specified as the desired result.

    cheers, teylyn

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count number of occurrences based on criteria in multiple columns and rows

    Try this...

    =COUNTIFS(C$4:Q$4,"OT",C5:Q5,">0")

    Based on your data structure it doesn't look like you need to know the employee name. However, if you want to be able to enter an employee name and get the result then try this version:

    B18 = employee name

    =COUNTIFS(C4:Q4,"OT",INDEX(C5:Q16,MATCH(B18,B5:B16,0),0),">0")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    03-31-2007
    Posts
    21

    Re: Count number of occurrences based on criteria in multiple columns and rows

    Quote Originally Posted by Tony Valko View Post
    Try this...

    =COUNTIFS(C4:Q4,"OT",INDEX(C5:Q16,MATCH(B18,B5:B16,0),0),">0")
    The above is exactly what i was looking for. Thanks

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count number of occurrences based on criteria in multiple columns and rows

    You're welcome. Thanks for the feedback!

+ 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. Count Number of Occurrences Based on Criteria
    By lightsandsirens5 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-15-2015, 04:22 PM
  2. How to count number of occurrences in a table if certain criteria are met.
    By VBAhelp3456 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-10-2015, 07:06 AM
  3. count the number of occurrences when value meets 3 x criteria
    By tiggi in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-26-2013, 03:12 PM
  4. Count occurrences based on criteria
    By Justinmih in forum Excel General
    Replies: 2
    Last Post: 01-05-2011, 09:07 AM
  5. Replies: 1
    Last Post: 11-20-2010, 05:38 AM

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