Giter Club home page Giter Club logo

excel-fuzzy-lookup-vba's Introduction

excel-fuzzy-lookup-vba

VBA code to do fuzzy lookup though functions in VBA in Microsoft Excel

Function to Fuzzy match LookupValue with entries in
column 1 of table specified by TableArray.
TableArray must specify the top left cell of the range to be searched
The function stops scanning the table when an empty cell in column 1
is found.

For each entry in column 1 of the table, FuzzyPercent is called to match LookupValue with the Table entry.

'Rank' is an optional parameter which may take any value > 0 (default 1) and causes the function to return the 'nth' best match (where 'n' is defined by 'Rank' parameter). If the 'Rank' match percentage< NFPercent (Default 5%), #N/A is returned.

IndexNum is the column number of the entry in TableArray required to be returned, as follows:

If IndexNum > 0 and the 'Rank' percentage match is >= NFPercent (Default 5%) the column entry indicated by IndexNum is returned.

if IndexNum = 0 and the 'Rank' percentage match is >= NFPercent (Default 5%) the offset row (starting at 1) is returned.This value can be used directly in the 'Index' function.

Algorithm can take one of the following values:

Algorithm = 1:
This algorithm is best suited for matching mis-spellings.
For each character in 'String1', a search is performed on 'String2'.
The search is deemed successful if a character is found in 'String2'
within 3 characters of the current position.
A score is kept of matching characters which is returned as a
percentage of the total possible score.

Algorithm = 2:
This algorithm is best suited for matching sentences, or
'firstname lastname' compared with 'lastname firstname' combinations
A count of matching pairs, triplets, quadruplets etc. in 'String1' and 'String2' is returned as a percentage of the total possible.

Algorithm = 3: Both Algorithms 1 and 2 are performed.

sources: https://www.mrexcel.com/board/threads/fuzzy-matching-new-version-plus-explanation.195635/ https://docs.google.com/document/d/1oYVHJcim6POTMtqtHwjq8bwxpMijwtBZhOSUfIZzhmM/edit?pli=1

excel-fuzzy-lookup-vba's People

Contributors

rolero avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.