+ Reply to Thread
Results 1 to 4 of 4

IF Statement: CountIF statement

  1. #1
    Tracy
    Guest

    IF Statement: CountIF statement

    Hello all!
    I need help on writing a CountIF statement for the following: I want a total
    count of serial numbers in column B that have discontinue in column E.


  2. #2
    pinmaster
    Guest
    Try this array formula:

    =SUM(IF((E1:E100="discontinue")*(B1:B100>0),1))

    entered using SHIFT+CTRL+ENTER

    HTH
    JG

  3. #3
    Tracy
    Guest

    re: IF Statement: CountIF statement

    The SUMPRODUCT worked. Thanks Elkar!

    "Elkar" wrote:

    > Depending on your needs, there are a couple different solutions here:
    >
    > Use this first one if you just want a count of how many times "discontinue"
    > appears in column E.
    >
    > =COUNTIF(E1:E100,"discontinue")
    >
    > Use this second one if you want a count of lines in which both a serial
    > number appears in column B and "discontinue" appears in column E.
    >
    > =SUMPRODUCT(--(B1:B100<>""),--(E1:E100="discontinue"))
    >
    > And of course, adjust the cell references to your needs. I just assumed
    > rows 1 through 100 for the examples.
    >
    > HTH,
    > Elkar
    >
    > "Tracy" wrote:
    >
    > > Hello all!
    > > I need help on writing a CountIF statement for the following: I want a total
    > > count of serial numbers in column B that have discontinue in column E.
    > >


  4. #4
    Elkar
    Guest

    re: IF Statement: CountIF statement

    Depending on your needs, there are a couple different solutions here:

    Use this first one if you just want a count of how many times "discontinue"
    appears in column E.

    =COUNTIF(E1:E100,"discontinue")

    Use this second one if you want a count of lines in which both a serial
    number appears in column B and "discontinue" appears in column E.

    =SUMPRODUCT(--(B1:B100<>""),--(E1:E100="discontinue"))

    And of course, adjust the cell references to your needs. I just assumed
    rows 1 through 100 for the examples.

    HTH,
    Elkar

    "Tracy" wrote:

    > Hello all!
    > I need help on writing a CountIF statement for the following: I want a total
    > count of serial numbers in column B that have discontinue in column E.
    >


+ 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