+ Reply to Thread
Results 1 to 5 of 5

Counting values in different columns

  1. #1
    Registered User
    Join Date
    05-28-2007
    Posts
    3

    Counting values in different columns

    I have a number of columns e.g Site, Status and Position. There are a limited number of things that can be put in each column e.g for site Crosby or Preston, for status Open or Closed and for position In House or External.

    How do I write a formula which calculates how many Crosby site issues are Closed and In House.

    I tried the following formula but it always calculates the first part of the formula e.g it returns 7 if that is the number of Crosby issues irrelevant of the other criteria.

    {=SUM(IF('IT Log'!$A$2:$A$20000="CRO",1,0))*(IF('IT Log'!$H$2:$H$20000="Open",1,0))*(IF('IT Log'!$I$2:$I$20000="In House",1,0))}

    Thanks

    Gary

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by gary965
    I have a number of columns e.g Site, Status and Position. There are a limited number of things that can be put in each column e.g for site Crosby or Preston, for status Open or Closed and for position In House or External.

    How do I write a formula which calculates how many Crosby site issues are Closed and In House.

    I tried the following formula but it always calculates the first part of the formula e.g it returns 7 if that is the number of Crosby issues irrelevant of the other criteria.

    {=SUM(IF('IT Log'!$A$2:$A$20000="CRO",1,0))*(IF('IT Log'!$H$2:$H$20000="Open",1,0))*(IF('IT Log'!$I$2:$I$20000="In House",1,0))}

    Thanks

    Gary
    Hi,
    try something like

    =SUMPRODUCT(--(A1:A2000="Crosby")*(--(H1:H2000="Open")*(--(I1:I2000="In House"))))

    amended to suit your data

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Try this,

    =SUMPRODUCT(--(A2:A20="Crosby")*(--(H2:H20="Closed")*(--(I2:I20="In House"))))
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211
    Quote Originally Posted by gary965
    I have a number of columns e.g Site, Status and Position. There are a limited number of things that can be put in each column e.g for site Crosby or Preston, for status Open or Closed and for position In House or External.

    How do I write a formula which calculates how many Crosby site issues are Closed and In House.

    I tried the following formula but it always calculates the first part of the formula e.g it returns 7 if that is the number of Crosby issues irrelevant of the other criteria.

    {=SUM(IF('IT Log'!$A$2:$A$20000="CRO",1,0))*(IF('IT Log'!$H$2:$H$20000="Open",1,0))*(IF('IT Log'!$I$2:$I$20000="In House",1,0))}

    Thanks

    Gary
    =SUMPRODUCT((A1:A2000="Crosby")*(H1:H2000="Open")*(I1:I2000="In House"))

  5. #5
    Registered User
    Join Date
    05-28-2007
    Posts
    3

    Thanks

    Thank you all for the responses, the problem is now solved thanks to your help.

    Gary

+ 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