Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
associate color
How to associate color to cell based on the value yes or no
Option Explicit Sub auto_open() Dim myRng As Range Dim myCell As Range Set myRng = Worksheets("sheet1").Range("a1:A1000") For Each myCell In myRng.Cells With myCell .Offset(0, 2).Validation.Delete If IsNumeric(.Value) _ And .Text Like "#.#" Then With .Offset(0, 2) .Value = "" With .Validation .Add Type:=xlValidateList, _ AlertStyle:=xlValidAlertStop, _ Operator:=xlBetween, Formula1:="Yes,No" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End With End If End With Next myCell End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
associate color
You have a response at your other post(s).
stats wrote: How to associate color to cell based on the value yes or no Option Explicit Sub auto_open() Dim myRng As Range Dim myCell As Range Set myRng = Worksheets("sheet1").Range("a1:A1000") For Each myCell In myRng.Cells With myCell .Offset(0, 2).Validation.Delete If IsNumeric(.Value) _ And .Text Like "#.#" Then With .Offset(0, 2) .Value = "" With .Validation .Add Type:=xlValidateList, _ AlertStyle:=xlValidAlertStop, _ Operator:=xlBetween, Formula1:="Yes,No" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End With End If End With Next myCell End Sub -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Min/Max help needed with a SumProduct | Excel Worksheet Functions | |||
repost: Min/Max help needed with a SumProduct | Excel Worksheet Functions | |||
Changing Excel's Color Pallette | Excel Discussion (Misc queries) | |||
Edit Color Palette Names | Excel Discussion (Misc queries) | |||
Color a cell and a value is automatically assigned to that color. | Excel Worksheet Functions |