Skip to content

Instantly share code, notes, and snippets.

@StephenOTT
Created December 11, 2012 17:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StephenOTT/4260308 to your computer and use it in GitHub Desktop.
Save StephenOTT/4260308 to your computer and use it in GitHub Desktop.
Find and Replace values in column with array values - Excel
Sub Macro1()
findArray = Array("/01/", "/02/", "/03/", "/04/", "/05/", "/06/", "/07/", "/08/", "/09/", "/10/", "/11/", "/12/")
replArray = Array("/Jan/", "/Feb/", "/Mar/", "/Apr/", "/May/", "/Jun/", "/Jul/", "/Aug/", "/Sep/", "/Oct/", "/Nov/", "/Dec/")
For i = 0 To UBound(findArray)
Selection.EntireColumn.Select
Selection.Replace What:=findArray(i), Replacement:=replArray(i), LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Next i
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment