I have been running this spreadsheet with the current macro "Outliers" for the last several months. I was using an older version of excel (1997 - 2003). The macro has worked fine. I just upgraded to Office 365 and saved the current workbook as an "Excel Macro-Enabled Workbook. Since I made this change, I get an error when I run the macro "Outliers". The line of code that is in error is indicated in red. Can anyone assist with this?
Sub Outliers()
'
' Outliers Macro
' Macro recorded 4/11/2017 by KDG User
'
'
Columns("N:N").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("N15").Select
ActiveCell.FormulaR1C1 = "Non Outliers"
With ActiveCell.Characters(Start:=1, Length:=12).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 1
End With
Range("N16").Select
Application.WindowState = xlNormal
Application.Left = 502
Application.Top = 70.75
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
Range("N16").Select
ActiveCell.FormulaR1C1 = "=IF(AND(RC[-1]>R3C3,RC[-1]<r4c3),rc[-1],"" "")"
Range("N17").Select
Application.WindowState = xlMaximized
Range("N16").Select
Selection.Copy
Range("N17:N100").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("G2").Select
ActiveCell.FormulaR1C1 = "=AVERAGE(R[14]C[7]:R[98]C[7])"
Range("G2").Select
Range("A1").Select
End Sub
</r4c3),rc[-1],"">
Sub Outliers()
'
' Outliers Macro
' Macro recorded 4/11/2017 by KDG User
'
'
Columns("N:N").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("N15").Select
ActiveCell.FormulaR1C1 = "Non Outliers"
With ActiveCell.Characters(Start:=1, Length:=12).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 1
End With
Range("N16").Select
Application.WindowState = xlNormal
Application.Left = 502
Application.Top = 70.75
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
Range("N16").Select
ActiveCell.FormulaR1C1 = "=IF(AND(RC[-1]>R3C3,RC[-1]<r4c3),rc[-1],"" "")"
Range("N17").Select
Application.WindowState = xlMaximized
Range("N16").Select
Selection.Copy
Range("N17:N100").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("G2").Select
ActiveCell.FormulaR1C1 = "=AVERAGE(R[14]C[7]:R[98]C[7])"
Range("G2").Select
Range("A1").Select
End Sub
</r4c3),rc[-1],"">