Sub AM_namestonumbersandnames()
'
' AM_namestonumbersandnames Macro
'
'
Application.CutCopyMode = False
Selection.Copy
Cells.Replace What:="Jack A Jill", Replacement:="1Jack A Jill", LookAt _
:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
ActiveWindow.SmallScroll Down:=42
Range("D48").Select
Application.CutCopyMode = False
Selection.Copy
Cells.Replace What:="Charles A Charles", Replacement:="2Charles A Charles", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
ActiveWindow.SmallScroll Down:=27
Range("D76").Select
Application.CutCopyMode = False
Selection.Copy
Cells.Replace What:="Charles X Xylophone", Replacement:="3Charles X Xylophone", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
Range("D75").Select
Application.CutCopyMode = False
Selection.Copy
Cells.Replace What:="Dafne A Duck", Replacement:="4Dafne A Duck", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
ActiveWindow.SmallScroll Down:=51
Range("D124").Select
Application.CutCopyMode = False
Selection.Copy
Cells.Replace What:="Joshua A Tree", Replacement:="5Joshua A Tree", LookAt _
:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
ActiveWindow.SmallScroll Down:=9
Range("D135").Select
Application.CutCopyMode = False
Selection.Copy
Cells.Replace What:="Mark A Mark", Replacement:="6Mark A Mark", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
Selection.Copy
Cells.Replace What:="Charles Refined", Replacement:="8Charles Refined", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
Selection.Copy
Cells.Replace What:="James A Kake", Replacement:="9James A Kake", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
Cells.Replace What:="Patrick H Henry", Replacement:="10Patrick H Henry", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
End Sub
Note the code in bold. Not only have I added a new name to the code but I have increased the number before his name by one from the previous name. (i.e. "9James A Kake" to "10Patrick H Henry") This way I can sort his name in accordance with the original AMEX statement order. Any future names must also increase by one whole number. Therefore, the next added card member will have an eleven added to the code and the one after that will have a twelve added and so forth and so on. Therefore the button must have a counter.
Bookmarks