Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]() When I try to use the following function I get the following error! What am I doing wrong?(I think the curosr isstopping on the word CELL) Thanks 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 |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Open that workbook
go into the VBE select that project tools|References Look for MISSING When there's a missing reference, you can get an error like this. You'll have to decide to remove that reference (if it's not being used) or to replace it with the version that you have. pcor wrote: When I try to use the following function I get the following error! What am I doing wrong?(I think the curosr isstopping on the word CELL) Thanks 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 -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
That did it...Thanks
Ian M "Dave Peterson" wrote: Open that workbook go into the VBE select that project tools|References Look for MISSING When there's a missing reference, you can get an error like this. You'll have to decide to remove that reference (if it's not being used) or to replace it with the version that you have. pcor wrote: When I try to use the following function I get the following error! What am I doing wrong?(I think the curosr isstopping on the word CELL) Thanks 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 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find formatting doesn't work: "Excel cannot find data" | Excel Discussion (Misc queries) | |||
Vlookup to Return a Range of Data | Excel Discussion (Misc queries) | |||
How to convert MS Project to MS Excel. I don't have MS Project. | Excel Discussion (Misc queries) | |||
Project or library | New Users to Excel | |||
Excel has a "Find Next" command but no "Find Previous" command. | Excel Discussion (Misc queries) |