This is probably how I would do it...I want to format bottom doubleborder for all the cells having = sum() formula.
Sub DoubleUnderlineSumFormulas()
Dim Cell As Range
Application.ScreenUpdating = False
Cells.Replace "=SUM(", "=XXXSUM(", xlPart
For Each Cell In Cells.SpecialCells(xlFormulas, xlErrors)
Cell.Borders(xlEdgeBottom).LineStyle = xlDouble
Next
Cells.Replace "=XXXSUM(", "=SUM(", xlPart
Application.ScreenUpdating = True
End Sub
Sub DoubleUnderlineSumFormulas()
Dim Cell As Range
Application.ScreenUpdating = False
Cells.Replace "=SUM(", "=XXXSUM(", xlPart
For Each Cell In Cells.SpecialCells(xlFormulas, xlErrors)
[COLOR=Red] Cell.Borders(xlEdgeTop).LineStyle = xlContinuous[/COLOR]
Cell.Borders(xlEdgeBottom).LineStyle = xlDouble
[COLOR=Red] Cell.Font.Bold = True[/COLOR]
Next
Cells.Replace "=XXXSUM(", "=SUM(", xlPart
Application.ScreenUpdating = True
End Sub
Sub DoubleUnderlineSumFormulas()
Dim Cell As Range
Application.ScreenUpdating = False
Cells.Replace "=SUM(", "=XXXSUM(", xlPart
For Each Cell In Cells.SpecialCells(xlFormulas, xlErrors)
Cell.Borders(xlEdgeTop).LineStyle = xlContinuous
Cell.Borders(xlEdgeBottom).LineStyle = xlDouble
Cell.Font.Bold = True
Cell.NumberFormat = "0.00"
Next
Cells.Replace "=XXXSUM(", "=SUM(", xlPart
Application.ScreenUpdating = True
End Sub
Sub DoubleUnderlineSumFormulas()
Dim Cell As Range
Application.ScreenUpdating = False
Cells.Replace "=SUM(", "=XXXSUM(", xlPart
For Each Cell In Cells.SpecialCells(xlFormulas, xlErrors)
Cell.Borders(xlEdgeTop).LineStyle = xlContinuous
Cell.Borders(xlEdgeBottom).LineStyle = xlDouble
Cell.Font.Bold = True
[COLOR=Red] Cell.NumberFormat = "#,##0.00"[/COLOR]
Next
Cells.Replace "=XXXSUM(", "=SUM(", xlPart
Application.ScreenUpdating = True
End Sub
Sub DoubleUnderlineSumFormulas()
Dim Cell As Range
Application.ScreenUpdating = False
Cells.Replace "=SUM(", "=XXXSUM(", xlPart
For Each Cell In Cells.SpecialCells(xlFormulas, xlErrors)
Cell.Borders(xlEdgeTop).LineStyle = xlContinuous
Cell.Borders(xlEdgeBottom).LineStyle = xlDouble
Cell.Font.Bold = True
Cell.NumberFormat = "#,##0.00"
Next
Cells.Replace "=XXXSUM(", "=SUM(", xlPart
Application.ScreenUpdating = True
End Sub