![]() |
AUTO SUM ONLY SPECIFIC COLORED CELLS BY CONDITIONAL FORMATING
HI EVERY ONE
I HAVE THIS EVENT CODE FOR SUMMING DEFINED RANGE Private Sub Worksheet_Change(ByVal Target As Range) Dim RNG1 As Range Dim RNG2 As Range Set RNG1 = Range("D2:D20") Set RNG2 = Range("D21") If Not Intersect(RNG1, Target) Is Nothing Then RNG2.Value = Application.WorksheetFunction.Sum(RNG1) End If End Sub BUT WHAT I NEED URGENT TO ADD A CONDITION TO SUM (ONLY) AS EXAMPLE ALL Cells.Interior.ColorIndex = 3 I CONTROL WITH CELLS COLOR WITH CONDITIONAL FORMATING I HOPE ITS VERY CLAER , I HOPE ANY ONE CAN HELP APPRECIATED |
AUTO SUM ONLY SPECIFIC COLORED CELLS BY CONDITIONAL FORMATING
Conditional formatting does not change the .interior.colorindex property of a cell. You need to look at the formula(e) which determines whether to colour the cell red (usually colorindex of 3) and use that with sumif or the like. What formula determines a .colorindex of 3 in CF? -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157094 Microsoft Office Help |
All times are GMT +1. The time now is 11:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com