Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to use an UDF in a Conditional Formatting, but for some strange
reason it won't work! Is it at all possible to use UDFs in Conditional Formatting? If I remove the UDF, the Conditional Formatting works, and if I use the UDF in a cell, it also works. But put together it refuses to work??? TIA, CE |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have just created a simple UDF (test if the cell is a formula) and used
that in CF and it worked fine. What is your UDF, and what is the CF formula? -- __________________________________ HTH Bob "Charlotte E." <@ wrote in message ... I'm trying to use an UDF in a Conditional Formatting, but for some strange reason it won't work! Is it at all possible to use UDFs in Conditional Formatting? If I remove the UDF, the Conditional Formatting works, and if I use the UDF in a cell, it also works. But put together it refuses to work??? TIA, CE |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's excately my UDF :-)
True or False if the cell has formula - then give the cell another interior color... Strange ... There must be something, I've overseen... CE Bob Phillips wrote: I have just created a simple UDF (test if the cell is a formula) and used that in CF and it worked fine. What is your UDF, and what is the CF formula? "Charlotte E." <@ wrote in message ... I'm trying to use an UDF in a Conditional Formatting, but for some strange reason it won't work! Is it at all possible to use UDFs in Conditional Formatting? If I remove the UDF, the Conditional Formatting works, and if I use the UDF in a cell, it also works. But put together it refuses to work??? TIA, CE |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Public Function formulaa(r As Range) As Boolean
formulaa = r.HasFormula End Function Then pick a cell, say A1, and: Format Conditional Formatting Formula is =formulaa(A1) and pick the background colour. Copy A1 and paste/special/formats to wherever you desire. -- Gary''s Student - gsnu2007k "Charlotte E." wrote: That's excately my UDF :-) True or False if the cell has formula - then give the cell another interior color... Strange ... There must be something, I've overseen... CE Bob Phillips wrote: I have just created a simple UDF (test if the cell is a formula) and used that in CF and it worked fine. What is your UDF, and what is the CF formula? "Charlotte E." <@ wrote in message ... I'm trying to use an UDF in a Conditional Formatting, but for some strange reason it won't work! Is it at all possible to use UDFs in Conditional Formatting? If I remove the UDF, the Conditional Formatting works, and if I use the UDF in a cell, it also works. But put together it refuses to work??? TIA, CE |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Not entirely clear what your doing but you can't format a cell with a UDF, all you can do is return a value. You can then use the value returned in a conditional format formula. Perhaps you could explain a bit more. Mike "Charlotte E." wrote: I'm trying to use an UDF in a Conditional Formatting, but for some strange reason it won't work! Is it at all possible to use UDFs in Conditional Formatting? If I remove the UDF, the Conditional Formatting works, and if I use the UDF in a cell, it also works. But put together it refuses to work??? TIA, CE |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Charlotte,
You must have omitted the equal sign in front of your function entry (=MyFunc...). You can recognize it by the fact that conditional wizard puts your definition into brackets (="MyFunc..."). Regards -- Petr Bezucha "Charlotte E." wrote: I'm trying to use an UDF in a Conditional Formatting, but for some strange reason it won't work! Is it at all possible to use UDFs in Conditional Formatting? If I remove the UDF, the Conditional Formatting works, and if I use the UDF in a cell, it also works. But put together it refuses to work??? TIA, CE |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, ... in apostrophes ... as was clear by the signs themselves.
-- Petr Bezucha "PBezucha" wrote: Charlotte, You must have omitted the equal sign in front of your function entry (=MyFunc...). You can recognize it by the fact that conditional wizard puts your definition into brackets (="MyFunc..."). Regards -- Petr Bezucha "Charlotte E." wrote: I'm trying to use an UDF in a Conditional Formatting, but for some strange reason it won't work! Is it at all possible to use UDFs in Conditional Formatting? If I remove the UDF, the Conditional Formatting works, and if I use the UDF in a cell, it also works. But put together it refuses to work??? TIA, CE |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
documenting all UDFs in an XLA | Excel Programming | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
UDFs in Excel | Excel Programming | |||
Conditional Formatting that will display conditional data | Excel Worksheet Functions | |||
UDFs | Excel Programming |