+ Reply to Thread
Results 1 to 18 of 18

Counting question

  1. #1
    Registered User
    Join Date
    07-08-2005
    Posts
    11

    Counting question

    I'm trying to do something that seems easy, but just don't know how to:

    I want to count the number of times column B is not blank AND column A is a specified value. ex:

    A B

    C 1
    C
    C 1
    M 1
    C
    C 1

    So I'm looking for the number of times that "C" AND "1" occur.

    Any help is greatly appreciated.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try...

    =SUMPRODUCT(--($A$1:$A$6="C"),--($B$1:$B$6=1))

    OR

    =SUMPRODUCT(--($A$1:$A$6=D1),--($B$1:$B$6=E1))

    ...where D1 contains your first criterion, such as C, and E1 contains your second criterion, such as 1.

    Hope this helps!

    Quote Originally Posted by ckiraly
    I'm trying to do something that seems easy, but just don't know how to:

    I want to count the number of times column B is not blank AND column A is a specified value. ex:

    A B

    C 1
    C
    C 1
    M 1
    C
    C 1

    So I'm looking for the number of times that "C" AND "1" occur.

    Any help is greatly appreciated.

    Thanks!

  3. #3
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  4. #4
    Registered User
    Join Date
    07-08-2005
    Posts
    11

    Thanks!

    Thank you both. I will try those solutions out.

  5. #5
    Registered User
    Join Date
    07-08-2005
    Posts
    11

    Great!

    The solutions worked great! Now I want to one up it. How can do this to see if column B is not blank?

  6. #6
    Registered User
    Join Date
    07-01-2004
    Location
    Kent, UK
    Posts
    74
    To count where col A="C" and Col B is not blank change

    --($B$1:$B$6=1)

    to

    --($B$1:$B$6<>"")

  7. #7
    Registered User
    Join Date
    07-08-2005
    Posts
    11

    Excellent!

    Thank you very much! Slowly but surely I'll get the hang of excel.

  8. #8
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  9. #9
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  10. #10
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  11. #11
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  12. #12
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  13. #13
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  14. #14
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  15. #15
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  16. #16
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  17. #17
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

  18. #18
    Aladin Akyurek
    Guest

    Re: Counting question

    Two options...

    (a)

    =SUMPRODUCT(($A$2:$A$10=E2)+0,($B$2:$B$10=F2)+0)

    where E2 houses a condition like C and F2 a condition like 1.

    (b)

    In C2 enter & copy down:

    =A2&"#"&B2

    Then invoke:

    =COUNTIF($C$2:$C$10,E2&"#"&F2)

    ckiraly wrote:
    > I'm trying to do something that seems easy, but just don't know how to:
    >
    > I want to count the number of times column B is not blank AND column A
    > is a specified value. ex:
    >
    > A B
    >
    > C 1
    > C
    > C 1
    > M 1
    > C
    > C 1
    >
    > So I'm looking for the number of times that "C" AND "1" occur.
    >
    > Any help is greatly appreciated.
    >
    > Thanks!
    >
    >


    --

    [1] The SumProduct function should implicitly coerce the truth values to
    their Excel numeric equivalents.
    [2] The lookup functions should have an optional argument for the return
    value, defaulting to #N/A in its absence.

+ 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