+ Reply to Thread
Results 1 to 6 of 6

Asterisk (Wildcard) causing false matches

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    5

    Asterisk (Wildcard) causing false matches

    I am using the countif function on a column of numbers. I want to count how many times a number was used in a very large list. However, some of the numbers I am checking against the list have an asterisk (*) in them. For example, I have 4587 and 458*7. I would only want 4587 without the asterisk to show as having some matches, but both numbers come up with the same result. Is there a way to count the asterisk as a regular character instead of an wild card?
    Last edited by bel99004; 11-17-2016 at 05:41 PM. Reason: Solved

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Asterisk (Wildcard) causing false matches

    Can you attach a sample book ?

    Or at least the formula you currently have
    It's unclear where exactly the * exists, in the formula or in the data ? Or both?

  3. #3
    Registered User
    Join Date
    01-02-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Asterisk (Wildcard) causing false matches

    I've tried to attach a workbook to make things more clear. Hopefully it will work.
    Attached Files Attached Files

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Asterisk (Wildcard) causing false matches

    Try

    =COUNTIF(JointList,SUBSTITUTE(A3,"*","~*"))

    The substitute replaces the * with ~*

    The ~ is a flag to excel that the next character is treated literally.

  5. #5
    Registered User
    Join Date
    01-02-2013
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Asterisk (Wildcard) causing false matches

    Bingo! That worked! I knew how to find and replace using the tilde to ignore the wildcard aspect, but hadn't thought to include it in the function using Substitute. Brilliant!

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Asterisk (Wildcard) causing false matches

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can I use the asterisk (*) wildcard to save file in multiple PATH ???
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-30-2014, 01:29 PM
  2. Ignoring asterisk * (wildcard) in Excel Custom Lists
    By haitch4 in forum Excel General
    Replies: 1
    Last Post: 05-21-2013, 09:33 AM
  3. Wildcard '*' causing a hassle!
    By SillySox in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-12-2013, 03:36 AM
  4. [SOLVED] autofill a range with a formula that uses a wildcard (asterisk)
    By perducci in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-02-2012, 01:34 PM
  5. [SOLVED] Asterisk Wildcard in IF statement problem
    By shaft in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2012, 08:52 PM
  6. [SOLVED] problem with using asterisk as wildcard in conditional formatting
    By nsterng1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2012, 01:34 PM
  7. Asterisk as WildCard
    By yawnzzzz in forum Excel General
    Replies: 1
    Last Post: 04-14-2010, 09:08 AM

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