Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Including a variable into formatconditions

I am trying to convert the cell reference in the formula1 from a specific
cell to a program selected cell;

B391 to cells(rowindex,columnindex)

(actual code)
Range("B996:Y998").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression,
Formula1:="=AND(B391=1)"

everything I try turns into an error

Selection.FormatConditions(1).Interior.Pattern = xlGrid


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Including a variable into formatconditions

Formula1:="=AND(" & Cells(rowindex,columnindex).Address(0,0) & "=1)"

--
Regards,
Tom Ogilvy


"Chris" wrote in message
...
I am trying to convert the cell reference in the formula1 from a specific
cell to a program selected cell;

B391 to cells(rowindex,columnindex)

(actual code)
Range("B996:Y998").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression,
Formula1:="=AND(B391=1)"

everything I try turns into an error

Selection.FormatConditions(1).Interior.Pattern = xlGrid




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Including a variable into formatconditions

Thanks. I'll try this Monday when I get back to work

"Tom Ogilvy" wrote:

Formula1:="=AND(" & Cells(rowindex,columnindex).Address(0,0) & "=1)"

--
Regards,
Tom Ogilvy


"Chris" wrote in message
...
I am trying to convert the cell reference in the formula1 from a specific
cell to a program selected cell;

B391 to cells(rowindex,columnindex)

(actual code)
Range("B996:Y998").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression,
Formula1:="=AND(B391=1)"

everything I try turns into an error

Selection.FormatConditions(1).Interior.Pattern = xlGrid





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
Including a third variable in a point diagram by color-coding Celia Excel Discussion (Misc queries) 1 January 29th 08 04:47 PM
FormatConditions VBA Bug? DaveCrowley Excel Programming 7 May 24th 06 09:52 PM
FormatConditions(1).Formula1 Stefi Excel Programming 9 February 17th 06 10:37 AM
Including a variable number of columns in Excel Sum formula Richard Buttrey[_5_] Excel Programming 1 July 7th 04 10:29 AM
FormatConditions (fails in different Languages) DamiaoBR[_2_] Excel Programming 0 May 12th 04 01:54 AM


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