View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Gary''s Student
 
Posts: n/a
Default Need to sum values that are not strikethroughs

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)
--
Gary''s Student


"Rock" wrote:

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