(E-Mail Removed) wrote:
> Right now I'm looping through the sorted column and marking the
> beginning row and end row of a column having a specific value and
> selecting that.
>
> But does Excel have a mechanism that does this for you?
>
> Or perhaps, instead of selecting the rows, selects all the values in
> one column having a specific value?
>
> Even better yet would be a solution where the rows can then be deleted.
>
> Thanks.
I've used this method before..
' ------first find the value your looking for in column 'a'
ActiveSheet.Cells.Find(MyString, LookIn:=xlValues, LookAt:= _
xlWhole).Select
' -----next find how many other rows have the same value
Mycount = Application.Evaluate("=COUNTIF(A:A," & ActiveCell.Address &
")")
' ------then select all rows (and adjacent columns) where the values
are the same
Range(Selection.End(xlToRight), Selection.Offset(Mycount - 1,
0)).Select
'-------delete them if thats what you want
Selection.Delete Shift:=xlUp
Will