+ Reply to Thread
Results 1 to 5 of 5

COUNTIF for 2 conditions

Hybrid View

  1. #1
    Bruce
    Guest

    COUNTIF for 2 conditions

    How do you countif for 2 conditions?

    countif ( A1 = "Red" and "B1 = blue")

    Bruce

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    you could use a sumproduct

    =SUMPRODUCT(--(A1:A10="red"),--(B1:B10="blue"))

    Mangesh

  3. #3
    abc
    Guest

    Re: COUNTIF for 2 conditions

    Assume you have following data as a1:b6, fill c1:c6 with 1
    Blue Red 1
    Red Blue 1
    Blue Blue 1
    Orange Red 1
    Blue Red 1
    Red Black 1

    in Cell A7 input following formula
    =COUNT(IF((A1:A6="blue")*(B1:B6="red"),C11:C16)) and press
    "Ctrl"+"Shift"+"Enter" for array calculation



    "Bruce" <Bruce@discussions.microsoft.com> 在郵件
    news:0045152E-8139-4D47-9E92-5F982F48D047@microsoft.com 中撰寫...
    > How do you countif for 2 conditions?
    >
    > countif ( A1 = "Red" and "B1 = blue")
    >
    > Bruce




  4. #4
    Bob Phillips
    Guest

    Re: COUNTIF for 2 conditions

    =SUMPRODUCT(--(A2:A100="Red"),--(B2:B100="Blue"))

    --
    HTH

    Bob Phillips

    "Bruce" <Bruce@discussions.microsoft.com> wrote in message
    news:0045152E-8139-4D47-9E92-5F982F48D047@microsoft.com...
    > How do you countif for 2 conditions?
    >
    > countif ( A1 = "Red" and "B1 = blue")
    >
    > Bruce




  5. #5
    NNNNN
    Guest

    Re: COUNTIF for 2 conditions

    put "red"/"blue" in a cell (eg A1)
    =countif(a2:a20,a1)

    "Bruce" <Bruce@discussions.microsoft.com> 撰寫於郵件新聞:0045152E-8139-4D47-9E92-5F982F48D047@microsoft.com...
    > How do you countif for 2 conditions?
    >
    > countif ( A1 = "Red" and "B1 = blue")
    >
    > Bruce




+ 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