Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Testing Blank Conditional Formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MacGuy - 23 May 2008 21:42 GMT
I'm having a problem testing for a blank cell with conditional formatting.

I'm looping through a range of cells and when I get to a cell that I know
should evaluate to TRUE for having met the conditional format it is returning
false.  The conditional format is when cell value is equal to blank (="")
then format cell with fill color.

cfStatus = testRange.Value = testRange.FormatConditions.Formula1

where testRange.value is blank and testRange.formatcondition.formula1 = "="""

I've reversed the conditions where the letter 'x' will meet the format
conditions.  In both cases the conditional formatting does what I want but
when testing I keep getting FALSE as having met the condition.  In the case
of 'x' the testrange.value is "x" and the testrange.formatcond...formula1
shows "="x""

Am I missing something?
Signature

MacGuy

Jim Cone - 23 May 2008 23:56 GMT
Maybe...
cfstatus = ActiveSheet.Evaluate(Range("testrange").FormatConditions(1).Formula1)
Signature

Jim Cone
Portland, Oregon  USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)

"MacGuy" <MacGuy@discussions.microsoft.com>
wrote in message
I'm having a problem testing for a blank cell with conditional formatting.

I'm looping through a range of cells and when I get to a cell that I know
should evaluate to TRUE for having met the conditional format it is returning
false.  The conditional format is when cell value is equal to blank (="")
then format cell with fill color.
cfStatus = testRange.Value = testRange.FormatConditions.Formula1
where testRange.value is blank and testRange.formatcondition.formula1 = "="""
I've reversed the conditions where the letter 'x' will meet the format
conditions.  In both cases the conditional formatting does what I want but
when testing I keep getting FALSE as having met the condition.  In the case
of 'x' the testrange.value is "x" and the testrange.formatcond...formula1
shows "="x""
Am I missing something?
--
MacGuy

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.