have input box. Need criteria entered to refer to cond. format criteria
Hi Jason,
Text = InputBox("Enter the month to highlite:")
With Range("N4:S188")
Range("S188").Activate
.FormatConditions.Delete
.FormatConditions.Add Type:=xlCellValue, _
Operator:=xlEqual, _
Formula1:="=N4=MONTH(" & Text &
")"
.FormatConditions(1).Interior.ColorIndex = 40
End With
I would caution against using Text as a variable. It might not be a reserved
word yet, but it is used, and is unnecessarily dangerous.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Jason" wrote in message
...
This is what I have. I just wish my knowledge was a little more in depth.
I need the text when entered into the input box to be inserted into the
format conditions. If I enter mar then it will put mar in for the condition
to highlite. How do I tie these together. Any help is greatly appreciated.
Text = InputBox("Enter the month to highlite:")
Application.i 'm stuck????????
Range("N4:S188").Select
Range("S188").Activate
Selection.FormatConditions.Delete
Selection.FormatConditions.add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:=i 'm stuck?????????
Selection.FormatConditions(1).Interior.ColorIndex = 40
Range("N4").Select
|