+ Reply to Thread
Results 1 to 5 of 5

COUNTIF doesn't return any results

  1. #1
    Registered User
    Join Date
    09-21-2006
    Location
    Dallas, Texas
    MS-Off Ver
    Office 365 Subscription
    Posts
    56

    COUNTIF doesn't return any results

    I have the following formula in cell A2:51 (cell numbers are changed in each cell accordingly) =IF(AND(F2<1,UAL028!P$17>$P$1-8),"D, ","")& IF(OR(E2=U$20,E2=U$26,E2=U$32,E2=U$38),"T, ","") & IF(OR(E2=U$22,E2=U$28,E2=U$34,E2=U$40),"L, ","") & IF(OR(E2=U$21,E2=U$27,E2=U$33,E2=U$39),"N, ","") & IF(OR(E2=U$23,E2=U$29,E2=U$35,E2=U$41),"R, ","") & IF(F2=0,"F, ","") & IF( AND(F2 =0, OR( E2 = U$24, E2= U$30, E2 =U$36, E2 = U$42) ), "X", "" )

    In cell O2 I have =COUNTIF(A2:A51, "=D") but it doesn't return any results. There are times when the cell value contains multiple letters (as you can see in the formula) and times when the cell is blank.

    What is wrong with either formula?

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: COUNTIF doesn't return any results

    The COUNTIF formula will count those cells containing D and nothing else (no preceding or trailing blanks)
    Gary's Student

  3. #3
    Registered User
    Join Date
    09-21-2006
    Location
    Dallas, Texas
    MS-Off Ver
    Office 365 Subscription
    Posts
    56

    Re: COUNTIF doesn't return any results

    Is there a workaround or some other formula that I could use to count the letter D in the cells?

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: COUNTIF doesn't return any results

    Try:

    =COUNTIF(A2:A51, "=*D*")

  5. #5
    Registered User
    Join Date
    09-21-2006
    Location
    Dallas, Texas
    MS-Off Ver
    Office 365 Subscription
    Posts
    56

    Re: COUNTIF doesn't return any results

    That worked. 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