ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Strike-throughs and equations (https://www.excelbanter.com/excel-discussion-misc-queries/188228-strike-throughs-equations.html)

Kevin

Strike-throughs and equations
 
Hello people:
I need some advice: When you have an equation to sum all the numbers of a
column, is there some way that when you use a strike-through (part of the
fonts), that the number that now has the strike-through can be not-included
in the summation or is this impossible?
IE: There is a list of 10 items in the sum equation, but you want to
'cross-off' 2 of them, but not remove them from the list, while at the same
time only sum the remaining 8.
Thanks.
--
Kevin

T. Valko

Strike-throughs and equations
 
How about an easier alternative?

Use an adjacent column and mark values to exclude with a "X" :

...........A..........B
1....................10
2........X.........10
3........X.........20
4....................15
5....................10

=SUMIF(A1:A5,"<X",B1:B5)


--
Biff
Microsoft Excel MVP


"Kevin" wrote in message
...
Hello people:
I need some advice: When you have an equation to sum all the numbers of a
column, is there some way that when you use a strike-through (part of the
fonts), that the number that now has the strike-through can be
not-included
in the summation or is this impossible?
IE: There is a list of 10 items in the sum equation, but you want to
'cross-off' 2 of them, but not remove them from the list, while at the
same
time only sum the remaining 8.
Thanks.
--
Kevin




Gord Dibben

Strike-throughs and equations
 
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

=SumNoStrike(range)


Gord Dibben MS Excel MVP

On Tue, 20 May 2008 14:00:11 -0700, Kevin
wrote:

Hello people:
I need some advice: When you have an equation to sum all the numbers of a
column, is there some way that when you use a strike-through (part of the
fonts), that the number that now has the strike-through can be not-included
in the summation or is this impossible?
IE: There is a list of 10 items in the sum equation, but you want to
'cross-off' 2 of them, but not remove them from the list, while at the same
time only sum the remaining 8.
Thanks.




All times are GMT +1. The time now is 12:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com