using sumif with text formatting

  • Thread starter Thread starter ash
  • Start date Start date
A

ash

I am trying to sum a range based on the text format of the cells.

For instance, if the range contains normal formatting and strikethroug
formatting, can I sum only those cells with strikethrough formatting
 
Hi
if you need this you'll need VBA to sum your range. e.g.
try the following user defined function:

Public Function sum_strike(rng As Range)
Dim cell As Range
Dim ret_value
For Each cell In rng
If cell.Font.Strikethrough Then
ret_value = ret_value + cell.Value
End If
Next
sum_strike = ret_value
End Function

Use this function in your worksheet like
=SUM_STRIKE(A1:A10)
 
Back
Top