Macros from PC to edit to work in Mac

Kazdima

Board Regular
Joined
Oct 15, 2010
Messages
221
Hello all,
i have a Macro prepared in Excel 2013 for PC and need help to edit it to work in Mac.
I would appreciate anyone's help.
i made Bold the part which does not work.

Thank you.
====================================================================================
Sub Edit_New_Data()
Dim lastRow As Long

Application.ScreenUpdating = False
Application.CutCopyMode = False

With Sheets("Edit File")
.Columns("F:F").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

'Copy over data
Sheets("M_1").Range("B1:L1").Copy .Range("A1")
'Fill in formula
lastRow = .Cells(.Rows.Count, "E").End(xlUp).Row
.Range("F2:F" & lastRow).FormulaR1C1 = "=RC[-2]&RC[-1]"

.Columns("G:G").Replace What:=".", Replacement:="/", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False


'Adjust formatting
With .Cells.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Application.Goto .Range("A1")
End With
Application.ScreenUpdating = True
End Sub
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
23,920
The SearchFormat and ReplaceFormat arguments are not supported in Excel 2011 for Mac.

Removing those arguments should make it run.
 

Kazdima

Board Regular
Joined
Oct 15, 2010
Messages
221
I want to reformat dates (text format) like this
2010.11.08

<tbody>
</tbody>
in Column G:G which I run from a data base. How can I reformat them By Macro into 08/11/2010?
Or you are suggesting that I have to do it only manually and delete that Bold part?
Thank you.
 

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
23,920
Replace that line with
Code:
.Columns("G:G").Replace What:=".", Replacement:="/", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False
removing the two unsupported arguments.

Note, this is not a Mac/Windows issue per se, the SearchFormat argument was absent from Windows Excel VBA before 2013, its more an issue of age rather than platform.
 

Kazdima

Board Regular
Joined
Oct 15, 2010
Messages
221
Thank you very much, mikerickson. I tried in PC, it is working. It did not notice a missing part-:) Now I have to try in Mac-:))
 

Watch MrExcel Video

Forum statistics

Threads
1,123,477
Messages
5,601,893
Members
414,479
Latest member
Beau the dog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top