ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Limit Highlighting (https://www.excelbanter.com/excel-programming/352224-limit-highlighting.html)

Bill

Limit Highlighting
 
How do I limit the highlighting for the below code so that for the
Target.EntireRow code section that it only highlights the row from column A
to I. And for the Target.EntireColumn code section so that only highlights
the row from row 3 to 10.

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

Thanks

Bill

Bob Phillips[_6_]

Limit Highlighting
 
We, Tom Ogilvy and I, have answered this in your previous post. You only
need to ask once.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Bill" wrote in message
...
How do I limit the highlighting for the below code so that for the
Target.EntireRow code section that it only highlights the row from column

A
to I. And for the Target.EntireColumn code section so that only highlights
the row from row 3 to 10.

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

Thanks

Bill





All times are GMT +1. The time now is 11:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com