Hi. See if this works. You cannot have an array formula in VBA longer than 255 characters.
Code:
With Range("N2")
.FormulaArray = "=IF(AND(MIN(IF(M2=$B$2:$B$14829,$L$2:$L$14829))=100,L2=100),XXX,IF(AND(MIN(IF(M2=$B$2:$B$14829,$L$2:$L$14829))<100,L2=100),""No cell outage"",IF(MAX(IF(M2=$B$2:$B$14829,$L$2:$L$14829))-L2>5,""worst cwll"",""Site outage"")))"
.Replace What:="XXX", Replacement:="""No site outage"""
End With
assit with this
Sub Auto_TTAnalysis_RANREPORT()
'
' Auto_TTAnalysis_RANREPORT Macro
'
'
Columns("B:B").Select
Selection.Copy
Columns("M:M").Select
Selection.Insert Shift:=xlToRight
Columns("K:K").Select
Application.CutCopyMode = False
Selection.Copy
Columns("N:N").Select
Selection.Insert Shift:=xlToRight
Application.CutCopyMode = False
Selection.Copy
Columns("O:O").Select
Selection.Insert Shift:=xlToRight
Application.CutCopyMode = False
Selection.Copy
Columns("P:P").Select
Selection.Insert Shift:=xlToRight
Range("M1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "BTS"
Range("N1").Select
ActiveCell.FormulaR1C1 = "Category"
Range("O1").Select
ActiveCell.FormulaR1C1 = "Outage in ins"
Range("P1").Select
ActiveCell.FormulaR1C1 = "15 mins"
Range("N2").Select
Selection.FormulaArray = _
"=IF(AND(MIN(IF(RC[-1]=R2C2:R14829C2,R2C12:R14829C12))=100,RC[-2]=100),""No Site Outage"",IF(AND(MIN(IF(RC[-1]=R2C2:R14829C2,R2C12:R14829C12))<100,RC[-2]=100),""No Cell Outage"",IF(MAX(IF(RC[-1]=R2C2:R14829C2,R2C12:R14829C12))-RC[-2]>5,""Worst Cell"",""Site Outage"")))"
Range("N2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("O2").Select
Application.CutCopyMode = False
Selection.FormulaArray = "=(100-AVERAGEIFS(C[-3],C[-13],RC[-2]))*24*60/100"
Range("O2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("P2").Select
Application.CutCopyMode = False
Selection.FormulaArray = _
"=IF(RC[-1]>15,""More than 15 mins"",""Within 15 mins"")"
Range("P2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
Selection.AutoFilter
ActiveSheet.Range("$A$1:$P$8275").AutoFilter Field:=12, Criteria1:="0.00"
Range("A5").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete
Range("K1").Select
Selection.AutoFilter
Range("A1").Select
Sheets("HUAWEI").Select
Selection.CurrentRegion.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Font
.Size = 9
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
End With
With Selection
.HorizontalAlignment = xlGeneral
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("A1").Select
Selection.AutoFilter
Columns("I:J").Select
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Columns("D:D").Select
Selection.Cut
Columns("B:B").Select
Selection.Insert Shift:=xlToRight
Selection.Copy
Columns("M:M").Select
Selection.Insert Shift:=xlToRight
Columns("C:C").Select
Application.CutCopyMode = False
Selection.Copy
Columns("N:N").Select
Selection.Insert Shift:=xlToRight
Columns("C:C").Select
Application.CutCopyMode = False
Selection.Copy
Columns("O:O").Select
Selection.Insert Shift:=xlToRight
Columns("C:C").Select
Application.CutCopyMode = False
Selection.Copy
Columns("P:P").Select
Selection.Insert Shift:=xlToRight
Range("N1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Category"
Range("O1").Select
ActiveCell.FormulaR1C1 = "Outages in min"
Range("P1").Select
ActiveCell.FormulaR1C1 = "15 mins"
Range("N2").Select
Selection.FormulaArray = _
"=IF(AND(MIN(IF(RC[-1]=R2C2:R14829C2,R2C12:R14829C12))=100,RC[-2]=100),""No site outage"",IF(AND(MIN(IF(RC[-1]=R2C2:R14829C2,R2C12:R14829C12))<100,RC[-2]=100),""No Cell outage"",IF(MAX(IF(RC[-1]=R2C2:R14829C2,R2C12:R14829C12))-RC[-2]>5,""Worst cell"",""Site outage"")))"
Range("N2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("O2").Select
Application.CutCopyMode = False
Selection.FormulaArray = "=(100-AVERAGEIFS(C[-3],C[-13],RC[-2]))*24*60/100"
Range("O2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("P2").Select
Application.CutCopyMode = False
Selection.FormulaArray = _
"=IF(RC[-1]>15,""More than 15 mins"",""Within 15 mins"")"
Range("P2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
Selection.AutoFilter
Sheets("ZTE").Select
Range("B1").Select
Selection.Copy
Columns("E:E").Select
Columns("B:B").Select
Application.CutCopyMode = False
Selection.Copy
Columns("E:E").Select
Selection.Insert Shift:=xlToRight
Application.CutCopyMode = False
Selection.Copy
Columns("M:M").Select
Selection.Insert Shift:=xlToRight
Range("K1").Select
Application.CutCopyMode = False
Selection.Copy
Columns("K:K").Select
Application.CutCopyMode = False
Selection.Copy
Columns("N:N").Select
Selection.Insert Shift:=xlToRight
Application.CutCopyMode = False
Selection.Copy
Columns("O:O").Select
Selection.Insert Shift:=xlToRight
Application.CutCopyMode = False
Selection.Copy
Columns("P:P").Select
Selection.Insert Shift:=xlToRight
Range("N1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Category"
Range("O1").Select
ActiveCell.FormulaR1C1 = "OUTAGES IN MINS"
Range("P1").Select
ActiveCell.FormulaR1C1 = "15MINS"
Range("N2").Select
Selection.FormulaArray = _
"=IF(AND(MIN(IF(RC[-1]=R2C2:R14829C2,R2C12:R14829C12))=100,RC[-2]=100),""No site outage"",IF(AND(MIN(IF(RC[-1]=R2C2:R14829C2,R2C12:R14829C12))<100,RC[-2]=100),""No Cell outage"",IF(MAX(IF(RC[-1]=R2C2:R14829C2,R2C12:R14829C12))-RC[-2]>5,""Worst cell"",""Site Outage"")))"
Range("N2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("O2").Select
Application.CutCopyMode = False
Selection.FormulaArray = "=(100-AVERAGEIFS(C[-3],C[-13],RC[-2]))*24*60/100"
Range("O2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("P2").Select
Application.CutCopyMode = False
Selection.FormulaArray = _
"=IF(RC[-1]>15,""More than 15 mins,""""Within15mins"")"
Range("P2").Select
Selection.FormulaArray = _
"=IF(RC[-1]>15,""More than 15 mins"",""Within 15 mins"")"
Range("P2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.FillDown
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("M1").Select
Application.CutCopyMode = False
Selection.AutoFilter
ActiveSheet.Range("$A$1:$P$1586").AutoFilter Field:=12, Criteria1:="0.00"
Range("A168").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete
Range("K1581").Select
Selection.AutoFilter
Range("A1").Select
Sheets("HUAWEI").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$P$22388").AutoFilter Field:=12, Criteria1:="0"
Range("A485").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete
Range("K1").Select
Selection.AutoFilter
Range("A1").Select
Sheets("ERICSON").Select
End Sub