- Joined
- Apr 4, 2014
- Messages
- 1
- Reaction score
- 0
- Points
- 1
I am not a macro coder or a MAC user. It is my wife's MAC. I can edit the VB code a bit but that is about it. I can also fumble my way around on the MAC. I am using an excel sheet with recorded macros on a MAC computer. The macros were recorded on a PC and I have run a similar spreadsheet on the MAC with no problem. The macro has been updated a bit since it was last run on the mac but the instruction that is hanging things up is one that has run before. It is a search and replace instruction and what is being searched for and replaced has changed slightly but not significantly. See code below:
Range("C2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("D2").Select
ActiveSheet.Paste
[/B] Selection.Replace What:="am", Replacement:=" AM", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
[/B]
Selection.Replace What:="pm", Replacement:=" PM", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False The highlighted code is where the macro hangs. Can anyone help? Thank you.
Range("C2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("D2").Select
ActiveSheet.Paste
[/B] Selection.Replace What:="am", Replacement:=" AM", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
[/B]
Selection.Replace What:="pm", Replacement:=" PM", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False The highlighted code is where the macro hangs. Can anyone help? Thank you.
Last edited: