Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Spreadsheet with Macros
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Leonardo704" data-source="post: 1578249" data-attributes="member: 323891"><p>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:</p><p>Range("C2").Select</p><p>Range(Selection, Selection.End(xlDown)).Select</p><p>Selection.Copy</p><p>Range("D2").Select</p><p>ActiveSheet.Paste</p><p></p><p><span style="color: Green">[/B] Selection.Replace What:="am", Replacement:=" AM", LookAt:=xlPart, _</span></p><p><span style="color: Green">SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _</span></p><p><span style="color: Green">ReplaceFormat:=False</span></p><p><span style="color: Green"></span>[/B]</p><p>Selection.Replace What:="pm", Replacement:=" PM", LookAt:=xlPart, _</p><p>SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _</p><p>ReplaceFormat:=False The highlighted code is where the macro hangs. Can anyone help? Thank you.</p></blockquote><p></p>
[QUOTE="Leonardo704, post: 1578249, member: 323891"] 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 [COLOR="Green"][/B] Selection.Replace What:="am", Replacement:=" AM", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False [/COLOR][/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. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Spreadsheet with Macros
Top