+ Reply to Thread
Results 1 to 5 of 5

Countif problem

Hybrid View

  1. #1
    Registered User
    Join Date
    10-25-2007
    Posts
    85

    Countif problem

    Hello all,
    I'm having an issue trying to get a countif of a column. Essentially the column is populated with one of 6 values. They are all text values such as FTA, FTD, FTE, etc etc. Basically it doesn't recognize any of the cells in the column as what it is. I can have a cell that's displaying PTE and do an IF = PTE ,1,0 and it will display a 0. If I go into the cell and manually type the PTE in it displays a 1. No formatting options seem to change the outcome, even copying the entire column and pasting it as a value does not seem to alleviate the situation. I cannot for the life of me figure out what excel actually thinks the cell value is.

    Any help would be appreciated.

  2. #2
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852
    Check for leading or end spaces in the cells...

    You can use the TRIM formula if there are any.
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

  3. #3
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191
    Often, the error is an extra space at the end of the value. If Excel is reading A1 as "PTE ", and B1 has =IF(A1="PTE",1,0), it will return a 0 because the two aren't equal. Test the lengths of the first column with =Len(A1) and drag down.

    Edit: Just a hair too slow, I guess.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Could there be extra spaces in the cells?

    what does =Len(A1) result in? where A1 is one of the cell that you are having issues with.

    If the answer is 3, then you will need to attach the workbook to see what's going on..
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Registered User
    Join Date
    10-25-2007
    Posts
    85
    Ah yes, the spaces, now I feel silly for not thinking of that first lol. Thank you.

+ 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