View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Selection of Rows

Alan,

Sub AlanSelect()
Dim i As Long
Dim RowCount As Long
Dim mySelect As Range

RowCount = Range("A1").SpecialCells(xlCellTypeLastCell).Row

Set mySelect = Range("2:3")

For i = 5 To RowCount Step 3
Set mySelect = Union(mySelect, Range(i & ":" & i + 1))
Next i

mySelect.Select
End Sub

HTH,
Bernie
MS Excel MVP

"Alan" wrote in message
...
Hi,
I import a fairly large amount of data into Excel (2500 rows or so)

each
day from an ancient system, I'm not even really sure what the system is.
I've got the hang of Data to Columns, TRIM, etc to convert the data into a
form that can be manipulated in Excel.
What I need to do is to select the entire rows 2:3,5:6,8:9 and so on as

they
usually (but not always) contain superfluous data so I can check the
contents before deleting them. That is to say, Don't select row one but do
select rows two and three, Don't select row four but do select rows five

and
six and so on down a range of around 3000 rows.
I've tried without success to write a macro to do this as the large

range
makes manual selection very tedious. Can anyone please offer me any

advice?
All help gratefully received!
Thanks,
Alan.