Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Extracting conditional format conditions for cell

I have a range r (which is only one cell) and I'd like to programmatically
determine if there is a conditional format condition with a formula.

To add a conditional format, I do this:

R.FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW(),2=1"

What I want to know is if there is a formula?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Extracting conditional format conditions for cell

'---------------------------------------------------------------------
Public Function IsCF(rng As Range) As Boolean
'---------------------------------------------------------------------
Set rng = rng(1, 1)
IsCF = rng.FormatConditions.Count 0
End Function

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Barb Reinhardt" wrote in message
...
I have a range r (which is only one cell) and I'd like to programmatically
determine if there is a conditional format condition with a formula.

To add a conditional format, I do this:

R.FormatConditions.Add Type:=xlExpression,

Formula1:="=MOD(ROW(),2=1"

What I want to know is if there is a formula?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Extracting conditional format conditions for cell

Select a cell and run this:


Sub iscondition()
On Error GoTo nothere
s = Selection.FormatConditions(1).Formula1
MsgBox ("it is there")
Exit Sub
nothe
MsgBox ("not there")
End Sub
--
Gary's Student


"Barb Reinhardt" wrote:

I have a range r (which is only one cell) and I'd like to programmatically
determine if there is a conditional format condition with a formula.

To add a conditional format, I do this:

R.FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW(),2=1"

What I want to know is if there is a formula?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Extracting conditional format conditions for cell

Barb Reinhardt wrote:
I have a range r (which is only one cell) and I'd like to programmatically
determine if there is a conditional format condition with a formula.

To add a conditional format, I do this:

R.FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW(),2=1"

What I want to know is if there is a formula?

Thanks



Something like:-
Range("A1:A1000").Select
Cells.SpecialCells(xlCellTypeAllFormatConditions). Select

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200611/1

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 format with 3 conditions marc freshley Excel Worksheet Functions 2 August 15th 07 01:38 PM
2 CONDITIONS FOR CONDITIONAL FORMAT? merlin Excel Programming 3 September 12th 06 11:00 PM
Conditional Formatting 4+ conditions, format rows based on cell nockam[_4_] Excel Programming 10 July 12th 06 11:12 PM
Conditional Format - 3 conditions Mike Saffer Excel Worksheet Functions 3 April 13th 06 07:35 PM
more conditional format conditions rnc Excel Worksheet Functions 5 June 1st 05 11:58 AM


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