Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



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
notify of entered criteria Ken Excel Worksheet Functions 2 September 19th 08 09:25 AM
make criteria in sumif refer to another cell keithjdowling Excel Worksheet Functions 4 May 31st 06 02:17 AM
I need a chart reference if certain criteria is entered... jbf frylock Excel Discussion (Misc queries) 0 May 4th 06 08:47 PM
Countif using format criteria not number criteria? Rumbla76 Excel Worksheet Functions 1 April 20th 05 05:38 AM
Countif using format criteria....not number criteria? Troy Excel Worksheet Functions 1 April 20th 05 04:50 AM


All times are GMT +1. The time now is 04:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"