Trying a little humor with the subject.
I recorded the following macro in excel, then shortened/simplified it. If I am in Developer Mode and run it from there, it works great, but.. I am trying to assign the code to a button. When I do and click the button, it appears to be running on the sheet where the button is, not the sheet where my data is.
Searching, I was not able to find how to correct this.
I recorded the following macro in excel, then shortened/simplified it. If I am in Developer Mode and run it from there, it works great, but.. I am trying to assign the code to a button. When I do and click the button, it appears to be running on the sheet where the button is, not the sheet where my data is.
Searching, I was not able to find how to correct this.
Code:
Sub Configure_Dates() Range("E2:E7500").Select
Selection.Replace What:=",", Replacement:=", ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("F2:F7500").Select
Selection.Replace What:="@", Replacement:=" ", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("E2:E7500").Select
Selection.NumberFormat = "m/d/yyyy"
Range("G2:G7500").Select
Selection.NumberFormat = "m/d/yyyy"
Range("H2:H7500").Select
Selection.NumberFormat = "m/d/yyyy"
End Sub