+ Reply to Thread
Results 1 to 6 of 6

Item Count

Hybrid View

  1. #1
    Registered User
    Join Date
    04-20-2007
    Posts
    5

    Item Count

    Can someone please help me with this query
    Questions
    1.Count of All "RESLOVED" or "CLOSED" item from column B for 'A' item from column A
    2.Count of All "RESLOVED" or "CLOSED" item from column B for 'B' item from column A
    3.Count of All "RESLOVED" or "CLOSED" item from column B for 'C' item from column A
    --------------------------------------------------------------------------
    A B
    ----------------------------
    A RESOLVED
    A ASSIGNED
    A OPEN
    A CLOSE
    A RESOLVED
    A RESOLVED
    B RESOLVED
    B RESOLVED
    B RESOLVED
    B RESOLVED
    B RESOLVED
    B CLOSE
    B CLOSE
    B CLOSE
    B CLOSE
    B CLOSE
    B CLOSE
    B CLOSE
    C CLOSE
    C OPEN
    C OPEN
    C OPEN
    C OPEN


    Thanks in Advance
    ~ram

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    1.Count of All "RESLOVED" or "CLOSED" item from column B for 'A' item from column A
    2.Count of All "RESLOVED" or "CLOSED" item from column B for 'B' item from column A
    3.Count of All "RESLOVED" or "CLOSED" item from column B for 'C' item from column A
    For all three equations, use this formula, but change the ="A" to ="B" and ="C" for #2 and #3:
    =SUMPRODUCT(--($A$1:$A$40="A")*(--($B$1:$B$40="RESOLVED")+(--($B$1:$B$40="CLOSE"))))
    Also, adjust your ranges as necessary. My example used rows 1 through 40. And notice I used "CLOSE", not "CLOSED", since none of your example data said "CLOSED".

  3. #3
    Registered User
    Join Date
    04-20-2007
    Posts
    5
    Thanks Paul.It works.

    I have changed range to 23 from 40
    =SUMPRODUCT(--($A$1:$A$23="A")*(--($B$1:$B$23="RESOLVED")+(--($B$1:$B$23="CLOSE"))))

    If it is not to much of trouble to you,I have one more requirement instead of range can I give whole column name.since no. of rows are variable in my case.

    Thanks in advance.
    ~ram

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    With SUMPRODUCT, you cannot use an entire column reference (like A:A or B:B). You can, however, use large references such as A1:A65000, B1:B1800, etc., just not full columns. Just pick a number that is a few hundred greater than you'll ever expect to need.

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    You can also use dynamic ranges

  6. #6
    Registered User
    Join Date
    04-20-2007
    Posts
    5
    I thought so .Thanks once again

    Regards
    ~ram

+ 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