Here's one way
Dim cRows As Long
With ActiveSheet
.Range("A1").EntireRow.Insert
cRows = .Cells(Rows.Count, "A").End(xlUp).Row
.Columns("A:A").AutoFilter Field:=1, Criteria1:="=toy1*",
Operator:=xlAnd
.Rows("2:" &
cRows).SpecialCells(xlCellTypeVisible).EntireRow.I nterior.ColorIndex = 35
End With
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"sdnicsm " wrote in message
...
Is there a way to change the colorindex of rows based upon the result of
a vba find then collapse the ones that are not results of the find??
Ex:
toy1234
toy2
toy1 is cool
toy3
toy4
toy1 is nerdy
All of the rows to changeinterior color are the ....toy1*
then hide the rest. Seems easy but I haven't gotten it to work.
thnx
sdnicsm
---
Message posted from http://www.ExcelForum.com/