Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Interior Cell Colour - Conditional Formatting


I have the following UDF that returns the interior cell colour value o
a cell:
Function InteriorColor(CellColor As Range)
Application.Volatile
InteriorColor = CellColor.Interior.ColorIndex
End Function

However, when I use it on a cell that has conditional formatting - an
the formatting is being applied - the result is not the interior colo
value of the conditional format.

Does anyone know of a UDF that will recognise when a cell ha
conditional formatting and give the interior cell colour if th
formatting is being applied?

Many Thanks

--
michael.a
-----------------------------------------------------------------------
michael.a7's Profile: http://www.excelforum.com/member.php...fo&userid=3302
View this thread: http://www.excelforum.com/showthread.php?threadid=53537

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Interior Cell Colour - Conditional Formatting

http://www.cpearson.com/excel/CFColors.htm

Tim

"michael.a7" wrote in message
...

I have the following UDF that returns the interior cell colour value of
a cell:
Function InteriorColor(CellColor As Range)
Application.Volatile
InteriorColor = CellColor.Interior.ColorIndex
End Function

However, when I use it on a cell that has conditional formatting - and
the formatting is being applied - the result is not the interior color
value of the conditional format.

Does anyone know of a UDF that will recognise when a cell has
conditional formatting and give the interior cell colour if the
formatting is being applied?

Many Thanks.


--
michael.a7
------------------------------------------------------------------------
michael.a7's Profile: http://www.excelforum.com/member.php...o&userid=33027
View this thread: http://www.excelforum.com/showthread...hreadid=535376



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Interior Cell Colour - Conditional Formatting

The easiest way is to replicate the same formula that the cell uses for its
conditional formatting.
--
Gary''s Student


"michael.a7" wrote:


I have the following UDF that returns the interior cell colour value of
a cell:
Function InteriorColor(CellColor As Range)
Application.Volatile
InteriorColor = CellColor.Interior.ColorIndex
End Function

However, when I use it on a cell that has conditional formatting - and
the formatting is being applied - the result is not the interior color
value of the conditional format.

Does anyone know of a UDF that will recognise when a cell has
conditional formatting and give the interior cell colour if the
formatting is being applied?

Many Thanks.


--
michael.a7
------------------------------------------------------------------------
michael.a7's Profile: http://www.excelforum.com/member.php...o&userid=33027
View this thread: http://www.excelforum.com/showthread...hreadid=535376


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Interior Cell Colour - Conditional Formatting

See http://www.xldynamic.com/source/xld.CFConditions.html

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"michael.a7" wrote
in message ...

I have the following UDF that returns the interior cell colour value of
a cell:
Function InteriorColor(CellColor As Range)
Application.Volatile
InteriorColor = CellColor.Interior.ColorIndex
End Function

However, when I use it on a cell that has conditional formatting - and
the formatting is being applied - the result is not the interior color
value of the conditional format.

Does anyone know of a UDF that will recognise when a cell has
conditional formatting and give the interior cell colour if the
formatting is being applied?

Many Thanks.


--
michael.a7
------------------------------------------------------------------------
michael.a7's Profile:

http://www.excelforum.com/member.php...o&userid=33027
View this thread: http://www.excelforum.com/showthread...hreadid=535376



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
Function to return interior colour of a cell G Man Excel Programming 7 December 16th 05 06:29 PM
interior.colorindex used with conditional formatting Wazooli Excel Worksheet Functions 7 February 25th 05 01:01 AM
Code to change interior colour only if current interior colour is BeSmart Excel Programming 2 October 5th 04 12:06 AM
Conditional Format with VBA - Interior Colour of cell based on value from in-cell dropdown Steve[_52_] Excel Programming 5 June 15th 04 11:45 AM
Conditional formatting & interior color Paul S Panoff Excel Programming 2 April 22nd 04 09:38 PM


All times are GMT +1. The time now is 01:02 AM.

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

About Us

"It's about Microsoft Excel"