Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Limit Row and Column Highlight

How can I adjust the following code that is used to create highlight cross
hairs so that only the column cells from rows 3 to row 10 and that the row is
ony hightlight from column A to I.


With Target.EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With

With Target.EntireColumn
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With


With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With


Thanks

Bill
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Limit Row and Column Highlight

Bill,

Is this what you want

Cells.FormatConditions.Delete
If Not Intersect(Target, Range("A3:J10")) Is Nothing Then
With Range("A" & Target.Row).Resize(1, 10)
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With

With Cells(3, Target.Column).Resize(8)
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With


With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With
End If


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Bill" wrote in message
...
How can I adjust the following code that is used to create highlight cross
hairs so that only the column cells from rows 3 to row 10 and that the row

is
ony hightlight from column A to I.


With Target.EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With

With Target.EntireColumn
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With


With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With


Thanks

Bill



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Limit Row and Column Highlight

With cells(Target.Row,"A").Resize(1,9)
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With

With cells(3,Target.Column).Resize(8,1)
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With


With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With

--
Regards,
Tom Ogilvy


"Bill" wrote in message
...
How can I adjust the following code that is used to create highlight cross
hairs so that only the column cells from rows 3 to row 10 and that the row

is
ony hightlight from column A to I.


With Target.EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With

With Target.EntireColumn
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 37
End With


With Target
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With


Thanks

Bill



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 do I auto-highlight a 'below limit' number in an average dj Excel Worksheet Functions 2 August 23rd 06 03:15 AM
How do I highlight a column depending on other column value? Ada Excel Worksheet Functions 2 July 12th 06 05:49 PM
How do I limit sorting a column to the column? Pat Excel Worksheet Functions 0 February 9th 06 04:01 PM
Will the column limit be over 256? Han Excel Discussion (Misc queries) 2 June 13th 05 08:15 PM
Column Limit Bryan[_8_] Excel Programming 3 June 18th 04 11:13 PM


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