View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Select the entire row

Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="CASH"
Selection.FormatConditions(1).Font.ColorIndex = 345


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
ups.com...
I want to select the entire row and change the color of the row where
the word "CASH" is in a single cell.

The following code of the macro is not working.

'
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlEqual, _
Formula1:="=""CASH"""
Rows(FormatConditions(1)).Select
Selection.Font.ColorIndex = 45


Please guide.