![]() |
UDFs and Conditional Formatting?
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 |
UDFs and Conditional Formatting?
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 |
UDFs and Conditional Formatting?
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 |
UDFs and Conditional Formatting?
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 |
UDFs and Conditional Formatting?
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 |
UDFs and Conditional Formatting?
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 |
UDFs and Conditional Formatting?
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 |
All times are GMT +1. The time now is 01:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com