Do both:
1) try:
Sub rpl()
Sheets("sheet1").Select
dim sWhat as string
sWhat = """State Abbreviation"""
repl = InputBox("State Abbreviation")
Cells.Replace What:=sWhat, Replacement:=repl, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
sWhat = """City"""
repl = InputBox("City")
Cells.Replace What:=sWhat, Replacement:=repl, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
sWhat = """Team Number"""
repl = InputBox("Team Number")
Cells.Replace What:=sWhat, Replacement:=repl, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
2) Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
Bookmarks