Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to do a Lotto 649 sheet which marks each number you get b
filling in the block with a fill color, and also at the end of the ro give a count how many numbers you have. I have tried to do this but I can only get one or the other to work. I can't get the two formulas to work together on one sheet Below are the formulas Formula 1 - =CountColor($A$2,B3:K3) Code Function CountColor(rColor As Range, rSumRange As Range) '''''''''''''''''''''''''''''''''''''' 'Written by Ozgrid Business Applications 'www.ozgrid.com 'Counts cells based on a specified fill color. ''''''''''''''''''''''''''''''''''''''' Dim rCell As Range Dim iCol As Integer Dim vResult iCol = rColor.Interior.ColorIndex For Each rCell In rSumRange If rCell.Interior.ColorIndex = iCol Then vResult = vResult + 1 End If Next rCell CountColor = vResult End Function Formula 2 - Choose Format|Conditional Formatting From the first dropdown, choose Formula Is For the formula, use the CountIf function: =COUNTIF($A$45:$K$49,B3) Click the Format button. Select formatting options (green pattern,), click OK Click OK Thanks Keit -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count color cell | Excel Discussion (Misc queries) | |||
Count, Sum, and Filter by Color | Excel Worksheet Functions | |||
Can you count cells by color? | Excel Worksheet Functions | |||
using vba to do a count for color cell | Excel Discussion (Misc queries) | |||
Fiil Color Fixed Spacing | Excel Discussion (Misc queries) |