+ Reply to Thread
Results 1 to 9 of 9

Fuzzy number search

  1. #1
    Registered User
    Join Date
    04-30-2015
    Location
    Oregon, USA
    MS-Off Ver
    2010
    Posts
    50

    Fuzzy number search

    Hi, I'm using a search box macro to find data.
    Currently it works great for any Text based entry being searched for, but when searching for a number it only searches for text with the numbers contained in the text or for the exact number.
    I've tried but I can't get it to search for the number entered in the search box, within a number OR within text
    I'm sorry if that sounds confusing.
    Here is my code;
    Please Login or Register  to view this content.
    I will attach a sample worksheet in just a short moment
    File Room Records .xlsm
    Last edited by Ajohn403; 09-30-2015 at 03:26 PM. Reason: Sample Workbook

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Fuzzy number search

    Force numbers to be treated as text by adding a single quote.

  3. #3
    Registered User
    Join Date
    04-30-2015
    Location
    Oregon, USA
    MS-Off Ver
    2010
    Posts
    50

    Re: Fuzzy number search

    Edit; My apologies I misunderstood
    Last edited by Ajohn403; 09-30-2015 at 04:56 PM.

  4. #4
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Fuzzy number search

    When you add the quote as I explained, use the Custom Filter option of Contains and the value 12 will find all 3 results as you wanted.

    It is a simple macro solution to make changed values in a column to be text if it is a number or just run a macro and fix any existing range of data that way.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Fuzzy number search

    Re-enter (or convert) the case numbers on the sheet that are all numeric as text.
    --Enter a case number like '126587 with a leading single quote
    --Or format column B as text and reenter the numeric case numbers.

    Then change your code to always search for text.
    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  6. #6
    Registered User
    Join Date
    04-30-2015
    Location
    Oregon, USA
    MS-Off Ver
    2010
    Posts
    50

    Re: Fuzzy number search

    Thanks alpha and kenneth, That does work.
    Though, In the Un-Censored file I have nearly 6,000 entries that I definitely don't have the time to re-type..
    Is there a way to use a more advanced filter to include both text and number results?

  7. #7
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Fuzzy number search

    Run this once to convert your existing case numbers.

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 09-30-2015 at 06:01 PM.

  8. #8
    Registered User
    Join Date
    04-30-2015
    Location
    Oregon, USA
    MS-Off Ver
    2010
    Posts
    50

    Re: Fuzzy number search

    Thanks alpha!
    I'll mark this as solved but I have one more question, are there any drawbacks/complications to having the case numbers in text format?

  9. #9
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Fuzzy number search

    No drawbacks I an think of unless you have to do math with the actual case numbers.

+ 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. fuzzy search for first four letters
    By jolinchew in forum Excel General
    Replies: 2
    Last Post: 06-10-2015, 05:08 AM
  2. [SOLVED] Fuzzy Search
    By CatalystDev in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2014, 06:16 AM
  3. Vlookup fuzzy search
    By lamdl in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-31-2014, 07:36 PM
  4. fuzzy search
    By tixbeast in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2013, 02:03 PM
  5. Using VBA to search for a string (fuzzy logic)
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-30-2013, 09:26 AM
  6. Fuzzy Lookup Search for 2 or 3 columns
    By kashifahmed in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-04-2013, 02:55 PM
  7. Fuzzy Logic - search for similar values
    By mojo249 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2012, 02:11 PM

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