Need to sum values that are not strikethroughs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to sum a column without it adding the rows that have strikethroughs
values; is it possible to combine a formula and vb code to a cell ?

=SUM(BH100:BH120) & Activecell.selection.font.strikethrough = false

Thank you
Khf
 
Try:


Function zum(r As Range) As Double
Dim rr As Range
For Each rr In r
If rr.Font.Strikethrough = False Then
zum = zum + rr.Value
End If
Next
End Function


In the worksheet use it like:

=zum(A1:A10)
 
Back
Top