Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My function points to a range, and I want it to count all the cells in the range that are the same colour as the cell in which the function is entered. How can I refer to the cell
Thanks in advanc Ro Function CountSameColour(MyRange as excel.range for each cell in myrang if cell.interior.colorindex={{{{{{{{this cell}}}}}}}}.interior.colorindex the countsamecolour=countsamecolour+ end i nex End Function |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.Caller
-- Regards, Tom Ogilvy "Rob" wrote in message ... My function points to a range, and I want it to count all the cells in the range that are the same colour as the cell in which the function is entered. How can I refer to the cell? Thanks in advance Rob Function CountSameColour(MyRange as excel.range) for each cell in myrange if cell.interior.colorindex={{{{{{{{this cell}}}}}}}}.interior.colorindex then countsamecolour=countsamecolour+1 end if next End Function |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
use application.caller for this Note: The return value won't change if you only change the format of this cell (this won't force a re-calculation) -----Original Message----- My function points to a range, and I want it to count all the cells in the range that are the same colour as the cell in which the function is entered. How can I refer to the cell? Thanks in advance Rob Function CountSameColour(MyRange as excel.range) for each cell in myrange if cell.interior.colorindex={{{{{{{{this cell}}}}}}}}.interior.colorindex then countsamecolour=countsamecolour+1 end if next End Function . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rank Function: Refer to more than one range | Excel Worksheet Functions | |||
How do I refer to the results of a function in a cell not the form | Excel Worksheet Functions | |||
How to refer to a text piece in a VBA custom function? | Excel Discussion (Misc queries) | |||
Refer to Named Range on another sheet for IF function | Excel Worksheet Functions | |||
have input box. Need criteria entered to refer to cond. format criteria | Excel Programming |