+ Reply to Thread
Results 1 to 11 of 11

How to count cells that only have an "x" in the column to be counted

  1. #1
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    How to count cells that only have an "x" in the column to be counted

    I have the following 2 formulas that I'm trying and all I get is #####. I only want to count cells that have an X in them.

    Please Login or Register  to view this content.

    and

    Please Login or Register  to view this content.

    When I use the following code, it works correctly, but it also counts all values and I only want to count X's.

    Please Login or Register  to view this content.

    Thanks in advance for your help.
    Last edited by Launchnet; 09-27-2010 at 12:05 PM.
    Thanks for helping . . .
    Matt @ Launchnet

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to count cells that only have an "x" in the column to be counted

    =wont countif work?
    COUNTIF(N12:N5093,"x")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    Re: How to count cells that only have an "x" in the column to be counted

    Yes, it counts correctly, but it displays a zero if there are no x's. I don't want zero's displayed.

    I don't know how to us the =if code since it works will all the cells listed ?

    Thanks

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to count cells that only have an "x" in the column to be counted

    =IF(COUNTIF(N12:N5093,"x"),COUNTIF(N12:N5093,"x"),"")
    or
    IF(COUNTIF(N12:N5093,"x")=0,"",COUNTIF(N12:N5093,"x"))

  5. #5
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    Re: How to count cells that only have an "x" in the column to be counted

    Hi Martin D Wilson . . .

    They both work very good.

    2 questions.

    1st . . . Why is there a black marker in the upper left corner of the cell if there is no qualifying count. It is just like the comment indicator which is Red and in the upper right.


    Please Login or Register  to view this content.
    2nd . . . What does the =0 represent in this formula ?

    Thanks, I am sure that this will be the last of my questions on this posting.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to count cells that only have an "x" in the column to be counted

    COUNTIF(N12:N5093,"x")=0 is what it says. if x is not found then the total would be 0
    the black triangle is something to do with error checking

    Black triangle, upper-left corner of a cell indicates changes: Tools, Track changes, Highlight Changes

  7. #7
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    Re: How to count cells that only have an "x" in the column to be counted

    Good Morning Martin D . . .

    Thanks for your reply.

    Now I understand what the =0 does.

    I went to the Tools as you suggested. It does not appear that there is a way of turning the black marker off. If there is, would you please let me know. I will close this as solved probably Tuesday.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to count cells that only have an "x" in the column to be counted

    what version of excel?

  9. #9
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    Re: How to count cells that only have an "x" in the column to be counted

    Thanks Martin D.

    I use Excel 2003 . . . but, others will be using later versions. All I need is to turn the markers off in Excel 2003 at this time if possible.

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How to count cells that only have an "x" in the column to be counted

    try
    tools/options/errorchecking tab
    turn of enable background error checking

  11. #11
    Valued Forum Contributor
    Join Date
    09-04-2007
    Location
    Ontario, Ca
    Posts
    624

    Re: How to count cells that only have an "x" in the column to be counted

    Good Morning Martin D . . .

    Works like a charm. Some how this option had been turned on.

    Thanks much.

+ 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