Skip to content

Instantly share code, notes, and snippets.

View walkergv's full-sized avatar

Glenn Walker walkergv

View GitHub Profile
@walkergv
walkergv / Find and Show Word Matches
Created May 13, 2013 22:28
VBA User Defined Function for finding keyword Matches in a keyword by looking through a list of available keywords.
Function ShowMatch(Keyword As String, ByVal MyRange As Range) As String
Dim Delimiter As String: Delimiter = "-"
Dim Temp As String: Temp = ""
For Each Row In MyRange.Rows
For Each cell In Row.Cells
If InStr(Keyword, cell) > 0 Then
Temp = Temp + Delimiter + cell
End If
Next cell
Next Row
@walkergv
walkergv / Make Modified Broad Match
Last active December 16, 2015 21:09
A Simple VBA Excel User Defined Function for adding modified broad match plus signs onto keywords . Also contains a TRUE or FALSE modifier to remove any common word (eg. the, a, for, etc...)
Function MakeModifiedBroadMatch(rng As Range, RemoveCommonWords As Boolean) As String
Dim WordList() As String
Dim CommonWords() As String: CommonWords = Split("how,do,i,with,in,a,to,the,for,is,of,and,are", ",")
Dim i As Integer
Dim x As Integer
Dim ContainsCommonWord As Boolean
Dim ModifiedBroadMatchKeyword As String
WordList = Split(rng.Value)
@walkergv
walkergv / Proper Upper Lower Case Excel Macro
Last active June 5, 2019 13:15
Excel Macros For Making Text In Cells Upper, Lower and Proper Case
'Code for Upper Case
Sub UpperCase()
Dim objCell As Object
For Each objCell In Selection
objCell.Value = UCase(objCell.Formula)
Next
End Sub
'Code for Lower Case