|
From: AndyKC on 2 Jul 2008 19:18 I have a column of figures and a separate cell that displays their sum. I'd like to be able to exclude from the summing process, the figures in that column that are struck-through. Can anyone suggest a way of doing this? Thanks Andy
From: H�ctor Miguel on 3 Jul 2008 02:19 hi, Andy ! > I have a column of figures and a separate cell that displays their sum. > I'd like to be able to exclude from the summing process, the figures in that column that are struck-through. > Can anyone suggest a way of doing this? you need the same approach as for sum/count cells with certain color do a google search and you will get a lot of sample "base" code or, if the Font.Strikethrough property is set in a sort of format condition... you could use the same condition to exclude these cells from the summing operation however (AFAIK) there is no any event that can trapp a simple format-change in your cells :-( if any doubts (or further information)... would you please comment ? hth, hector.
From: Gord Dibben on 3 Jul 2008 12:06 Public Function SumNoStrike(rngSumRange As Range) As Single Dim rngCell As Range 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 Wed, 2 Jul 2008 16:18:00 -0700, AndyKC <AndyKC(a)discussions.microsoft.com> wrote: >I have a column of figures and a separate cell that displays their sum. I'd >like to be able to exclude from the summing process, the figures in that >column that are struck-through. Can anyone suggest a way of doing this? > >Thanks > >Andy
|
Pages: 1 Prev: Charts not updating Next: Complicated comparison and highlighting question |