+ Reply to Thread
Results 1 to 9 of 9

counting multiple conditions

  1. #1
    Registered User
    Join Date
    07-21-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    40

    counting multiple conditions

    Hi all,
    I want to count all cells that contain the various "Enrolled" categories for my service. I know how to count just one of them but can't figure out how to count all 3 different one together. I have attached a spreadsheet for reference. The cell with the red background is the one that needs the formula. The end answer should be 7 but I don't want to manually count it!

    I'm pretty sure that when I see the answer I will kick myself with how simple it is - I just can't remember how to do it!

    Thanks in advance,

    Cameron
    Attached Files Attached Files

  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: counting multiple conditions

    This is the data in your file:

    Data Range
    A
    B
    F
    1
    Patient Number
    Enrolment status
    2
    Patient 1
    Enrolled - Active
    3
    Patient 2
    Enrolled - Assertive
    Active = 3
    4
    Patient 3
    Enrolled - Maintenance
    Assertive = 2
    5
    Patient 4
    Discharged
    Maintenance = 2
    6
    Patient 5
    Closed without enrollement
    Discharged = 1
    7
    Patient 6
    Enrolled - Active
    Closed = 2
    8
    Patient 7
    Enrolled - Assertive
    9
    Patient 8
    Enrolled - Maintenance
    10
    Patient 9
    Closed without enrollement
    11
    Patient 10
    Enrolled - Active


    Exactly what do you want to count? All the cells that contain the word Enrolled?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: counting multiple conditions

    This should give the result of 7
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    07-21-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: counting multiple conditions

    The total number of patients who are "Enrolled" regardless whether they are Active, Assertive of Maintenance. Column F is irrelevant to the calculations and is there for reference only.

  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: counting multiple conditions

    Quote Originally Posted by AlKey View Post
    =COUNTIF(B:B,"Enrolled"&"*")
    =COUNTIF(B:B,"Enrolled*")

  6. #6
    Registered User
    Join Date
    07-21-2015
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: counting multiple conditions

    Thanks guys - that is solved. Much appreciated.

    reputation added

    Thread marked as solved

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

    Re: counting multiple conditions

    If "Enrolled" is ALWAYS at the beginning of the string:

    =COUNTIF(B:B,"Enrolled*")

    If "Enrolled" might be anywhere within the string:

    =COUNTIF(B:B,"*Enrolled*")

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

    Re: counting multiple conditions

    You're welcome. We appreciate the feedback!

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: counting multiple conditions

    You could have your data in a table with a totals row on the bottom and then use the filter on the Enrolment Status column and enter in the Search box Enrolled or whatever term you want. Records containing Enrolled will be filtered out and the count shows in the totals row.Attachment 459285
    Table filter & total 2.JPG
    Attached Images Attached Images
    Last edited by newdoverman; 05-05-2016 at 07:56 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. Multiple conditions in counting
    By jduffy0920 in forum Excel General
    Replies: 2
    Last Post: 07-07-2015, 06:40 PM
  2. Counting with multiple conditions
    By liln5k in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-11-2014, 08:10 PM
  3. Counting with multiple conditions
    By BradDenton in forum Excel General
    Replies: 8
    Last Post: 05-31-2012, 03:37 PM
  4. Counting multiple Conditions
    By Joeysparrow in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-09-2012, 08:50 PM
  5. multiple conditions counting
    By bruzzer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-02-2010, 02:45 PM
  6. Counting multiple conditions
    By Sippy69 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-10-2008, 09:12 PM
  7. Counting with multiple conditions
    By Littleoladywho in forum Excel General
    Replies: 4
    Last Post: 09-19-2007, 04:40 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