+ Reply to Thread
Results 1 to 2 of 2

COUNTIF with Wildcard characters

  1. #1
    Registered User
    Join Date
    10-20-2011
    Location
    Pensacola, FL
    MS-Off Ver
    Excel 2007
    Posts
    1

    COUNTIF with Wildcard characters

    I have a list of 14 digit long numbers (ex: 12345678912345) and I need to count the number of cells in the column that have specific 2 digit sequence in the 9th and 10th place irrespective of what is in positions 1-8 or 11-14. I have written the function as the following: =COUNTIF(A1:A7000, "=????????01????") and all that this returns is the number 0. I validated the function by trying it on a text string and it worked. Does the COUNTIF function with wildcard characters not work with numbers? Thanks in advance for any help anyone can offer.

    Example: How many of the following numbers have a 0 in the 9th position and a 1 in the 10th position (the underlined numbers contain the 01 sequence?)

    12345678912345, 23456789012345, 34567890123456, 45678901234567, 56789012345678
    Last edited by rfadams; 10-20-2011 at 02:46 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: COUNTIF with Wildcard characters

    Quote Originally Posted by rfadams View Post
    Does the COUNTIF function with wildcard characters not work with numbers?
    That's right, only with TEXT

    You can try SUMPRODUCT like this

    =SUMPRODUCT((MID(A1:A7000,9,2)="01")+0)
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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