+ Reply to Thread
Results 1 to 6 of 6

Formula for COUNTIF using AND

  1. #1
    Registered User
    Join Date
    05-13-2011
    Location
    Milwaukee, Wiscoonsin
    MS-Off Ver
    Excel 2003
    Posts
    5

    Formula for COUNTIF using AND

    I have 2 columns of data. "Type" and "Status". "Type" has either "FG", "RM" or "WP" as the data. "Status" has either "O" (open) or "C" (closed). I am trying to create formula in another cell that will count how many "RM" are "O". I've tried several times with IF, COUNTIF, both using AND and cannot get it to work. Can someone help me please?
    Last edited by NBVC; 05-13-2011 at 03:56 PM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,446

    Re: Formula for COUNTIF using AND

    Hi, how about this?

    =sumproduct((Type_range="RM")*(Status_range="O"))

    eg

    =sumproduct((A1:A100="RM")*(B1:B100="O"))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula for COUNTIF using AND

    With 2003, you need Sumproduct

    e.g

    =Sumproduct(--(A1:A100="RM"),--(B1:B100="O"))

    adjust ranges to suit.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Formula for COUNTIF using AND

    You'll have to use SUMPRODUCT() in Excel 2003 because COUNTIFS() is not available.

    Try

    =SUMPRODUCT((range1="RM")*(range2="O"))

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Formula for COUNTIF using AND

    @NBVC

    Strike 3 - I'm out!

  6. #6
    Registered User
    Join Date
    05-13-2011
    Location
    Milwaukee, Wiscoonsin
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Formula for COUNTIF using AND

    Thank you, thank you, thank you!!!!!

+ 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