+ Reply to Thread
Results 1 to 5 of 5

=COUNTIF problem

  1. #1
    Registered User
    Join Date
    04-13-2005
    Location
    Cleveland, USA
    Posts
    33

    =COUNTIF problem

    I set up a sheet with a column of text values and used COUNTIF to count the number of each variable. The format was =countif(b2:b59,"2A"). This worked fine until I copied it to another similar spreadsheet. I adjusted the cell references, etc., but it returns a value of 0.0. I tried deleting the formula and typing it in from scratch and it still doesn't work. Does anybody know what's going on here?

  2. #2
    Forum Contributor
    Join Date
    06-21-2004
    Posts
    106
    What result do you get if you did =countif(range,"2A*")???

  3. #3
    Registered User
    Join Date
    04-13-2005
    Location
    Cleveland, USA
    Posts
    33
    Quote Originally Posted by pikapika13
    What result do you get if you did =countif(range,"2A*")???
    Adding the "*" did the trick. Do you know why?

  4. #4
    Forum Contributor
    Join Date
    06-21-2004
    Posts
    106
    Without the wildcard "*" your original formula will not match 2A with...lets say:
    "2A-BC". It will require an exact match.
    If you dont' think there are extra characters after your source data, I would check for unwanted spaces. Let me know if it is spaces that is causing the problem bc again..."2A" will not match with "2A ".

  5. #5
    Registered User
    Join Date
    04-13-2005
    Location
    Cleveland, USA
    Posts
    33
    There are definitely spaces after the "2A", as well as all the other variables such as 3A, CMU, and ICU. Thanks for your help. I would never have figured it out by myself!

+ 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