View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Selecting a Pattern of Rows

Sub AAA()
Set rng = Cells(1, 1).Resize(2, 1)
For i = 45 To 500 Step 45
Set rng = Union(rng, Cells(i, 1).Resize(2, 1))
Next
rng.EntireRow.Select
End Sub

if that selects the rows you want, then change Select to Delete and run it
again.

Change 500 to any number up to 65536

--
Regards,
Tom Ogilvy




"bodhisatvaofboogie" wrote:

Okay, I want to select rows 1,2.....47, 48.......93,94......etc etc on to
infinity. It is that pattern, so every 45th and 46th row, then have the
entire row deleted. How might I go about doing this??? Don't ask me why,
it's just one part of what I want my macro to do. I am at a loss for how to
write a formula up for this. THANKS!!!