Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Is there a smart way to select multiple rows based on #2 :)

Many thanks to Bob Kilmer for his great suggestion in the last question on a similar vein
Does anyone know how to manipulate this "replace" formula to work on cells with a set internal.colorindex value ?

Column("A:A").Selec
Selection.Replace What:="", Replacement:="", LookAt:=xlWhole,
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=True,
ReplaceFormat:=Fals

How do you weave in a "Interior.ColorIndex = 5" as the search criteria ?? Basically, on the same vein as before, if a cell in column "A" has a fill color of "5", for example, then set the value of the ID to "null" - later that whole row can be deleted using "Columns("A:A").SpecialCells(xlCellTypeBlanks).Ent ireRow.Delete Shift:=xlUp

If this is possible, again very curious as would be a neat method. Can't find any decent reference online for this
TI

Mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Is there a smart way to select multiple rows based on #2 :)

Hi Mike,

The 'standard' way of working with Colorindex is to add a helper column and
derive the colorindex in there. And then do any work on that column. Prob
lem with search and replace of course is that you would want to search on
one column and replace on the other. It would probably be best with a Find
loop and manually replace when found.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mike" wrote in message
...
Many thanks to Bob Kilmer for his great suggestion in the last question on

a similar vein.
Does anyone know how to manipulate this "replace" formula to work on cells

with a set internal.colorindex value ??

Column("A:A").Select
Selection.Replace What:="", Replacement:="", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=True, _
ReplaceFormat:=False

How do you weave in a "Interior.ColorIndex = 5" as the search criteria ??

Basically, on the same vein as before, if a cell in column "A" has a fill
color of "5", for example, then set the value of the ID to "null" - later
that whole row can be deleted using
"Columns("A:A").SpecialCells(xlCellTypeBlanks).Ent ireRow.Delete Shift:=xlUp"

If this is possible, again very curious as would be a neat method. Can't

find any decent reference online for this.
TIA

Mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Is there a smart way to select multiple rows based on #2 :)

Thanks Bob

I'm using a loop now... so I guess I'll stick with that. the helper column sounds like a nice idea... again a nice workaround..
may sneak that in somewhere
Many thanks again

Mike
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
Select rows based on keyword? Niniel Excel Discussion (Misc queries) 14 September 21st 07 08:18 PM
How do I Select Multiple Non Adjacent Rows based on a cell value? avalynch Excel Worksheet Functions 2 October 1st 06 07:45 PM
Select rows based on criteria sotiris_s Excel Worksheet Functions 4 November 14th 05 12:35 PM
Select rows and sort based on type Sarah Excel Discussion (Misc queries) 0 October 11th 05 05:06 PM
Is there a smart way to select multiple rows based on column... Mike[_81_] Excel Programming 6 May 1st 04 12:51 PM


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