Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
documenting all UDFs in an XLA Smallweed Excel Programming 2 May 20th 08 10:58 AM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
UDFs in Excel VBAnewbie Excel Programming 6 August 11th 06 03:36 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM
UDFs DoctorG Excel Programming 3 July 5th 05 01:49 PM


All times are GMT +1. The time now is 06:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"