Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi community
i do not really know how to use vba and this i only try myself but it did not work.. can community please assist me more... question: i wanted to count cell for color and when to view some sites (was intro by some in community) and i obtained this vba code.. Function CountYellow(MyRange As Range) Dim iCount As Integer Application.Volatile iCount = 0 For Each cell In MyRange If cell.Interior.ColorIndex = 6 Then iCount = iCount + 1 End If Next cell CountYellow = iCount End Function and what i did was, I open my xls and activate the VB editor and at "Project Window", I right-click the [sheet1] and choose view code, from there, I wrote down the vba code according and save the workbook following the further instruction, at the worksheet, I do a fill "yellow" into one cell, A1 thereafter I used the code : =CountYellow(A1:A5) and i got a return #NAME can someone kindly assist me in this :( thanks alot to community -- oldLearner57 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel: Syntax to change cell color based on color of another cell | Excel Worksheet Functions | |||
can i use the color of a cell to count the different colerd cells | Excel Discussion (Misc queries) | |||
count by specific text color in range of cell | Excel Discussion (Misc queries) | |||
Count if font color.. | Excel Discussion (Misc queries) | |||
detect cell color and count it | Excel Worksheet Functions |