View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Selecting Rows by Column Value

set rng = Columns(4).Find("VALUE2")
if not rng is nothing then
range(cells(1,1), rng.offset(-1,0)).EntireRow.Select

Look in help in VBA for the find method to see other arguments that might
affect your results.

--
Regards,
Tom Ogilvy

"Ed" wrote in message
...
My column "D" has only two values in it, (VALUE1 and VALUE2). My sheet is
sorted by this column. What I want need my macro to do is only select the
rows that have VALUE1 in column "D". Each time I run this the file size
would be different, so the first time my selection might be rows 1 through
1855. The next time it might be rows 1200 through 3500. The selection will
always be grouped together because of the sort.


T.I.A.
Ed