ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HOW TO APPLY GRAY HIGHLIGHTING TO RANGE, BASED ON ENTRY IN ONE CELL (https://www.excelbanter.com/excel-programming/443555-how-apply-gray-highlighting-range-based-entry-one-cell.html)

Dave K

HOW TO APPLY GRAY HIGHLIGHTING TO RANGE, BASED ON ENTRY IN ONE CELL
 
Hello, i am attempting to apply gray shading to the range i12:w12,
based on the cell g12. That is, if cell g12 contains the word "yes", i
want the cells i12 thru w12 to be highlighted gray.

Is there a simple way to accomplish that result?

Thanks for any suggestions.

ManicMiner17

HOW TO APPLY GRAY HIGHLIGHTING TO RANGE, BASED ON ENTRY IN ONECELL
 
On 26/08/2010 17:04, Dave K wrote:
Hello, i am attempting to apply gray shading to the range i12:w12,
based on the cell g12. That is, if cell g12 contains the word "yes", i
want the cells i12 thru w12 to be highlighted gray.

Is there a simple way to accomplish that result?

Thanks for any suggestions.


Hi Dave,

You could put this in the worksheet's code module:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = Range("$G$12").Address And _
Range("$G$12").Value ="yes" Then

Range("I12:W12").Interior.ColorIndex = 15

End If

End Sub


Dave K

HOW TO APPLY GRAY HIGHLIGHTING TO RANGE, BASED ON ENTRY IN ONE CELL
 
On Aug 26, 11:21*am, ManicMiner17 wrote:
On 26/08/2010 17:04, Dave K wrote:

Hello, i am attempting to apply gray shading to the range i12:w12,
based on the cell g12. That is, if cell g12 contains the word "yes", i
want the cells i12 thru w12 to be highlighted gray.


Is there a simple way to accomplish that result?


Thanks for any suggestions.


Hi Dave,

You could put this in the worksheet's code module:

Private Sub Worksheet_Change(ByVal Target As Range)

* If Target.Address = Range("$G$12").Address And _
Range("$G$12").Value ="yes" Then

* * *Range("I12:W12").Interior.ColorIndex = 15

* *End If

End Sub


Thanks very much!

Dave Peterson[_2_]

HOW TO APPLY GRAY HIGHLIGHTING TO RANGE, BASED ON ENTRY IN ONECELL
 
Check your other post.

On 08/26/2010 11:04, Dave K wrote:
Hello, i am attempting to apply gray shading to the range i12:w12,
based on the cell g12. That is, if cell g12 contains the word "yes", i
want the cells i12 thru w12 to be highlighted gray.

Is there a simple way to accomplish that result?

Thanks for any suggestions.


--
Dave Peterson


All times are GMT +1. The time now is 06:03 AM.

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