View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default How do I select all odd-numbered rows in huge excel sheet?

Enter and run this small macro:

Sub odds()
Dim r As Range
Set rr = Cells(1, "A")
Set r = ActiveSheet.UsedRange
nLastRow = r.Rows.Count + r.Row - 1
For i = 1 To nLastRow Step 2
Set rr = Union(rr, Cells(i, "A"))
Next
rr.EntireRow.Select
End Sub


If you are unfamiliar with VBA, See:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Gary''s Student


"bgilliam" wrote:

Want to select all odd-numbered rows in a spreadsheet without going thru the
task of hand selecting each.