+ Reply to Thread
Results 1 to 6 of 6

Counting data to a certain criteria in another cell

  1. #1
    Forum Contributor
    Join Date
    01-29-2008
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    237

    Counting data to a certain criteria in another cell

    Good morning all

    I have the code below

    Please Login or Register  to view this content.
    As most of you know, this formula counts the cells that have Non-compliant and Compliant, what im trying today is to count the cells which are displaying Non-compliant and Compliant but equal what number is in cell C20.

    Thus all cells containing NC and C that are equal to C20 which contain 11

    So in plain english, its only counts the rows which have equal what data is in C20

    Hope this makes sense

    G

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting data to a certain criteria in another cell

    You don't specify where the value in C20 will be located, however, in general terms you would use:

    =IF(C20="","",SUMPRODUCT(('Frequent Service'!$H$7:$H$2100="Non-Compliant")+('Frequent Service'!$H$7:$H$2100="Compliant"),--(otherrange=C20)))

    Note for your existing formula you could use a more efficient approach of:

    =IF(C20="","",SUM(COUNTIF('Frequent Service'!$H$7:$H$2100,{"Non-Compliant","Compliant"})))

  3. #3
    Forum Contributor
    Join Date
    01-29-2008
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    237

    Re: Counting data to a certain criteria in another cell

    Sorry, I'll try and explain a bit better

    This formula needs to go into another sheet, which is a summary sheet.

    So if i enter 11 into C20, ont he summary sheet then i need the formula to look at the sheet "frequent service" and count all the enteries that have NC and C that are equal to 11

    I hope thats better explained

    G

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting data to a certain criteria in another cell

    Quote Originally Posted by drgogo
    I hope thats better explained
    Not really I'm afraid.

    You've still not said where the value entered in C20 on the summary sheet is to be found on the frequent service sheet - this range should replace "otherrange" in the suggested formula.

  5. #5
    Forum Contributor
    Join Date
    01-29-2008
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    237

    Re: Counting data to a certain criteria in another cell

    Sorry, i get what you mean, the data that needs to equal C20 are found in column B on the frequent service sheet.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting data to a certain criteria in another cell

    so, using the earlier suggestion, change "otherrange" to 'Frequent Service'!$B$7:$B$2100

+ 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