+ Reply to Thread
Results 1 to 6 of 6

How can I count data based on two conditions in a series of columns?

  1. #1
    Registered User
    Join Date
    10-27-2013
    Location
    detroit, mi, usa
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question How can I count data based on two conditions in a series of columns?

    Hello,

    I am an Excel novice and would appreciate any advice on this problem. I am trying to evaluate which zipcodes are generating leads and which are not over a period of time by counting appointment results based on zipcode. My data looks something like this:

    A B C D E F
    Zipcode Appt Result 2nd Appt Result 3rd Appt Result
    48103 10/1/2013 No Show 10/7/2013 No Show 10/14/2013 No Show
    48104 10/1/2013 No Show 10/7/2013 Showed & Retained
    48103 10/1/2013 No Show 10/7/2013 No Show 10/14/2013 No Show
    48104 10/1/2013 Showed & Retained
    48103 10/1/2013 No Show 10/7/2013 No Show 10/14/2013 No Show
    48104 10/1/2013 Showed & Retained

    I tried to use the countifs function: =COUNTIFS(A2:A7,"48103",C2:G7,"No Show") but I get a #VALUE! error message. Am I messing up the function structure? Is there a better function to use?

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

    Re: How can I count data based on two conditions in a series of columns?

    Try it like this...

    =SUMPRODUCT((A2:A7=48103)*(C2:G7="no show"))

    Better to use cells to hold the criteria:

    A20 = 48103
    B20 = no show

    =SUMPRODUCT((A2:A7=A20)*(C2:G7=B20))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    10-27-2013
    Location
    detroit, mi, usa
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How can I count data based on two conditions in a series of columns?

    You are a genius! Thank you so much! God bless you!

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

    Re: How can I count data based on two conditions in a series of columns?

    You're welcome. Thanks for the feedback!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: How can I count data based on two conditions in a series of columns?

    Not sure if you are still monitoring this, but if your zip codes are values (test with =isnumber(), should get a TRUE if they are), then you just need to remove the ""...

    =COUNTIFS(A2:A7,48103,C2:G7,"No Show")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

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

    Re: How can I count data based on two conditions in a series of columns?

    With the COUNTIFS function, the ranges must be the same size.

+ 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. Extract Data based on conditions on multiple columns
    By checkoncomp in forum Excel General
    Replies: 6
    Last Post: 07-03-2013, 01:54 PM
  2. Replies: 4
    Last Post: 07-20-2012, 07:51 AM
  3. Count of unique values based on two columns of data
    By JodyMathis1973 in forum Excel General
    Replies: 8
    Last Post: 04-18-2012, 10:11 AM
  4. create a data-series based on two different columns of data ?
    By Derrick in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-20-2005, 09:05 AM
  5. [SOLVED] count number of cells based on TWO conditions (2 different columns
    By Troi-Xanh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2005, 09:06 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