IF Strikethrough
This UDF will exclude cells with strikethrough.
Public Function SumNoStrike(rngSumRange As Range) As Single
Dim rngCell As Range
For Each rngCell In rngSumRange
If IsNumeric(rngCell.Value) Then
If rngCell.Font.Strikethrough = False Then
SumNoStrike = SumNoStrike + rngCell.Value
End If
End If
Next rngCell
End Function
Gord Dibben MS Excel MVP
On Fri, 15 May 2009 05:52:03 -0700, lightbulb
wrote:
Is there a way to have a formula not include a cell that the text has
strikethrough lines?
What I need is if $C$22:$C$375 = abc or = def or = ghi then sum G22:G375
unless strikethgrough has been added to the text by formatting of the cell.
It's the only way I could think of for certain cells to sometimes not be
added up (if the job is sent out rather than done in-plant) without deleteing
the formulas in G22:G375
Any Suggestions?
Thanks!
|