Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is ther a way to change the interior.colorindex of multiple rows

Is there a way to change the colorindex of rows based upon the result o
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
sdnics

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Is ther a way to change the interior.colorindex of multiple rows

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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Is ther a way to change the interior.colorindex of multiple rows

try to use a filter with a custom setting - begins with
--
Patrick Molloy
Microsoft Excel MVP

"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/



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
Rephrasing Interior.ColorIndex 36 question. Linda New Users to Excel 1 May 28th 10 01:49 PM
Finding last occurence of Interior.ColorIndex 36 Linda New Users to Excel 2 May 28th 10 07:04 AM
Sumif interior.colorindex condition John Excel Worksheet Functions 7 June 1st 06 01:17 AM
interior.colorindex used with conditional formatting Wazooli Excel Worksheet Functions 7 February 25th 05 01:01 AM
VBA syntax for Font & Interior ColorIndex Dennis Excel Discussion (Misc queries) 1 November 25th 04 07:38 PM


All times are GMT +1. The time now is 11:45 PM.

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"