Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Conditional Formating a range

Is it possible to do a condional format of a range D123:N123 that would
check for the word No?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Conditional Formating a range

this is just a macro i recorded while doin the conditional formatting. if
no is entered into this range, the cell will have whute text on red
background

Sub Macro1()
Range("D123:N123").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""no"""
Selection.FormatConditions(1).Font.ColorIndex = 2
With Selection.FormatConditions(1).Borders(xlLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.FormatConditions(1).Borders(xlRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.FormatConditions(1).Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.FormatConditions(1).Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.FormatConditions(1).Interior.ColorIndex = 3
Range("D6").Select
End Sub

--


Gary


"Patrick Simonds" wrote in message
...
Is it possible to do a condional format of a range D123:N123 that would
check for the word No?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Conditional Formating a range

Thanks for your reply. I found a solution trying different options:

=COUNTIF(D122:R122,"no")



"Gary Keramidas" wrote in message
...
this is just a macro i recorded while doin the conditional formatting. if
no is entered into this range, the cell will have whute text on red
background

Sub Macro1()
Range("D123:N123").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""no"""
Selection.FormatConditions(1).Font.ColorIndex = 2
With Selection.FormatConditions(1).Borders(xlLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.FormatConditions(1).Borders(xlRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.FormatConditions(1).Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.FormatConditions(1).Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.FormatConditions(1).Interior.ColorIndex = 3
Range("D6").Select
End Sub

--


Gary


"Patrick Simonds" wrote in message
...
Is it possible to do a condional format of a range D123:N123 that would
check for the word No?





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
Using conditional formating to copy range of cells HTawb Excel Discussion (Misc queries) 1 June 22nd 07 10:31 PM
Conditional Formating carl Excel Worksheet Functions 1 April 3rd 06 07:39 PM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
conditional formating?? cjjoo Excel Worksheet Functions 3 October 26th 05 08:43 AM
Conditional formating Frank Haverkamp[_3_] Excel Programming 1 January 11th 04 10:17 PM


All times are GMT +1. The time now is 09:33 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"