PC Excel VBA Macro for Mac Excel 2011

I have a VBA Macro created on a PC in Excel VBA; that does not run on the Mac version of Excel 2011.  The error I get is on the "set rFine = " line...

Anyone know how I can get this macro to run on the Mac version of Excel 2011?

Sub FixDimension()
    Dim rFind As Range, sFind(), sReplace(), sOffset(), i As Long
    sFind = Array("Full Banner - 468 x 60", "Skyscraper - 120 x 600", "Medium Rectangle - 300 x 250", _
                  "Super Banner - 728 x 90", "GEOPOP - 1 x 1", "780x260 - 780 x 260", _
                  "Slider - 1 x 1", "Raw Click - 1 x 1", "Interstitial - 1 x 1", "Pixel/Popup - 1 x 1")
    sReplace = Array("468x60", "120x600", "300x250", "728x90", "GeoPop", "Bottom of Page", _
                     "Messenger Ad", "Raw Click", "Interstitial", "Pop Under")
    sOffset = Array("CPM", "CPM", "CPM", "CPM", "GeoPop", "CPM", "Messenger Ad", "Raw Click", "Interstitial", "Pop Under")
    With ActiveSheet.UsedRange
        For i = LBound(sFind) To UBound(sFind)
            Set rFind = .Find(What:=sFind(i), LookAt:=xlWhole, MatchCase:=False, SearchFormat:=False)
            If Not rFind Is Nothing Then
                    rFind.Value = sReplace(i)
                    rFind.Offset(, -1) = sOffset(i)
                    Set rFind = .FindNext(rFind)
                Loop While Not rFind Is Nothing
            End If
        Next i
    End With

End Sub

Open in new window

Who is Participating?
Rory ArchibaldConnect With a Mentor Commented:
Change line 14 to:
Set rFind = .Find(What:=sFind(i), LookAt:=xlWhole, MatchCase:=False)

Open in new window

What is the Error and what is the value of sFind(i) when the error occurs?

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.