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

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Testing Blank Conditional Formatting

Maybe...
cfstatus = ActiveSheet.Evaluate(Range("testrange").FormatCond itions(1).Formula1)
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"MacGuy"
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
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
conditional formatting:highlight row based on blank or non-blank c Nat Maxwell Excel Worksheet Functions 3 May 14th 23 07:43 PM
Conditional Formatting - Blank or Zero Annie Excel Discussion (Misc queries) 10 January 11th 08 09:52 PM
conditional formatting -- testing for multiple words The Moose Excel Discussion (Misc queries) 8 August 20th 06 01:11 PM
conditional formatting:highlight row based on blank or non-blank c Nat Maxwell Excel Programming 4 December 1st 05 12:11 AM
conditional formatting:highlight row based on blank or non-blank c Nat Maxwell Excel Discussion (Misc queries) 2 November 30th 05 10:30 PM


All times are GMT +1. The time now is 11:50 PM.

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"