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


I have columns in excel that get formatted based on conditiona
formatting.

e.g. if cell G1 contains "1" then cell g2 is changed from bein
automatic colour to being Blue text on grey background.

The Blue text is colorindex 5.

However if the conditional formatting is applied and I select the cel
in the VB code the activecell.font.colorindex still returns the defaul
colour rather than the current formatted colour.

I need to check if the cell is a different font and if so skip it so i
there any way to get the font with the conditional formatting ?

Regards
Bria

--
wardide
-----------------------------------------------------------------------
wardides's Profile: http://www.excelforum.com/member.php...fo&userid=1502
View this thread: http://www.excelforum.com/showthread.php?threadid=27730

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Conditional Formatting

Brain

You need to use the FormatCondition object. Hopefully the code below will
help, it looks for the Interior property of the first FormatCondition(1)
object in the range A1 and prints it to the immediate window.

Sub Getconditionalformatprops()
Dim fmtCondition As FormatCondition
Dim IntColor As Integer
Set fmtCondition = Range("A1").FormatConditions(1)
IntColor = fmtCondition.Interior.ColorIndex
Debug.Print IntColor
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"wardides" wrote in message
...

I have columns in excel that get formatted based on conditional
formatting.

e.g. if cell G1 contains "1" then cell g2 is changed from being
automatic colour to being Blue text on grey background.

The Blue text is colorindex 5.

However if the conditional formatting is applied and I select the cell
in the VB code the activecell.font.colorindex still returns the default
colour rather than the current formatted colour.

I need to check if the cell is a different font and if so skip it so is
there any way to get the font with the conditional formatting ?

Regards
Brian


--
wardides
------------------------------------------------------------------------
wardides's Profile:
http://www.excelforum.com/member.php...o&userid=15022
View this thread: http://www.excelforum.com/showthread...hreadid=277307



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
How can I convert conditional formatting into explicit formatting? Patrick Harris Excel Discussion (Misc queries) 0 April 9th 09 12:00 AM
Conditional formatting--different formatting depending on cell con Tammy S. Excel Discussion (Misc queries) 3 March 30th 09 08:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 02:21 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"