COUNTIF 'can't see' a code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrpleasant
    New Member
    • Jul 2010
    • 4

    COUNTIF 'can't see' a code

    Hi,
    I have a workbook containing a worksheet of extracted rows (from other sheets) and a summary worksheet of COUNTIF statements. This sheet displays totals of the extracted rows by the value in one particular column. My problem is the COUNTIF statement that is supposed to total up the number of rows where the code is "LDS" does not seem able to see them. I am successfully using the same syntax to total rows where the code is "3M" or "AER" or "AISS", etc, but "LDS" appears to completely fox it. It's BIZARRE! Please help me look stupid by pointing out what the problem is. Many thanks.
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    Could be a whitespace problem.
    Try TRIM

    Comment

    • mrpleasant
      New Member
      • Jul 2010
      • 4

      #3
      Very plausible! Thanks. I have tried TRIM as suggested, and also CLEAN which the helptext for TRIM guided me to. Neither have worked, but I'm not sure if I'm using them correctly:

      Code:
      =COUNTIF('ALL Shortages'!$E$1:$E$1191,CLEAN("LDS"))

      Comment

      • mrpleasant
        New Member
        • Jul 2010
        • 4

        #4
        Duh! Even I can see that doesn't make sense. I need to clean or trim the cell holding the actual value, not the search value...

        Comment

        • mrpleasant
          New Member
          • Jul 2010
          • 4

          #5
          Yes, cleaning the code in the extract row has done it. Now just need to work out how to do it automatically. Many thanks.

          Comment

          Working...