I have a spreadsheet that is used to import data to a database each week.
The data has to be formatted a particular way for it to import correctly.
I want to use VBA to format the data rather than it be a manual process.
This code changes the data to specific names when the XL workbook is re-opened:
Option Explicit
Private Sub Workbook_Open()
'course name changes
Columns("G:G").Select
Selection.Replace What:="Course Name", replacement:="New Course Name", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _ False, ReplaceFormat:=False
I repeat this code for each new name. Is there a more concise way of writing this that uses less text? Possibly a way that lets me list all the course names in an array as key value pairs, this way it would be easier to maintain. Thanks