LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Multiple row selection

Hello,

Is there a way to select multiple rows given a certain
criteria is met? I have the following code which only
selects one row at a time, but I would like the code to
select all the rows for which the cell in the Range is
equal to "Cat".

Dim R As Range, Cel As Range
Set R = Range("A8:A27")
Set Cel = Range("A8:A27")
For Each Cel In R
If Cel.Value = "Cat" Then _
Cel.EntireRow.Select
Next Cel

Thank you in advance.
 
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
multiple selection AND Excel Discussion (Misc queries) 9 February 13th 09 07:40 PM
multiple selection.... AND Excel Worksheet Functions 1 February 13th 09 12:35 AM
ListBox Multiple Selection Todd Huttenstine Excel Programming 1 April 26th 04 06:15 PM
Multiple Col. Selection David Fixemer Excel Programming 6 February 17th 04 11:10 PM
multiple selection Michalll Excel Programming 3 December 3rd 03 12:58 AM


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