Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I select all odd-numbered rows in huge excel sheet?

Want to select all odd-numbered rows in a spreadsheet without going thru the
task of hand selecting each.
  #2   Report Post  
Posted to microsoft.public.excel.misc
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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't paste in excel without having an open excel sheet! troy stud Excel Discussion (Misc queries) 3 October 27th 06 11:46 PM
extract odd numbered rows from one sheet to put into another? missy Excel Discussion (Misc queries) 1 August 16th 06 09:14 PM
view excel sheet tabs in multiple rows gingerq Setting up and Configuration of Excel 2 June 27th 06 01:25 AM
How can I read over than 65,536 rows from excel spreed sheet Lillian Excel Discussion (Misc queries) 2 April 16th 06 01:47 AM
How do I select multiple rows randomly in MS Excel? Varun Excel Discussion (Misc queries) 2 April 18th 05 08:10 AM


All times are GMT +1. The time now is 11:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"