PC Review


Reply
Thread Tools Rate Thread

How do I select all even or odd rows in Excel

 
 
=?Utf-8?B?bW1jY2xhaW4=?=
Guest
Posts: n/a
 
      30th Oct 2007
In a large file, is it possible to select all even or odd rows quickly?
 
Reply With Quote
 
 
 
 
Ron Coderre
Guest
Posts: n/a
 
      30th Oct 2007
I think if you describe what you utlimately want to do with those rows, we can probably suggest a solution that will work for you.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)


"mmcclain" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> In a large file, is it possible to select all even or odd rows quickly?




 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      30th Oct 2007
Try this for even rows:

Sub evens()
Set r = ActiveSheet.UsedRange
nLastRow = r.Rows.Count + r.Row - 1
Set r1 = Cells(2, 1)
For i = 4 To nLastRow Step 2
Set r1 = Union(r1, Cells(i, 1))
Next
r1.EntireRow.Select
End Sub

--
Gary''s Student - gsnu200752


"mmcclain" wrote:

> In a large file, is it possible to select all even or odd rows quickly?

 
Reply With Quote
 
=?Utf-8?B?TG9yaQ==?=
Guest
Posts: n/a
 
      30th Oct 2007
Maybe add an extra column with two values (0,1) for odd and even rows by
entering 0,1,0,1 down the column. Extend the selection by selecting the first
few values and double-clicking the fill handle (in the bottom right corner of
the selection).

Now you can use Data>Filter>Autofilter to select 0,1 to show alternate rows.

"mmcclain" wrote:

> In a large file, is it possible to select all even or odd rows quickly?

 
Reply With Quote
 
MartinW
Guest
Posts: n/a
 
      30th Oct 2007
Hi Mclain

One way,
In a blank column put 0 in the first cell and 1 in the second
Highlight both cells grab the fill handle and drag down
as far as is needed, hold ctrl and let go of the left button.

You can then use Autofilter to select 0 or 1.

HTH
Martin


"mmcclain" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In a large file, is it possible to select all even or odd rows quickly?



 
Reply With Quote
 
Ron Coderre
Guest
Posts: n/a
 
      30th Oct 2007
Following the direction of other posts.....

Try something like this:

A1: 1
A2: (blank)

Select A1:A2
Click and HOLD on the drag handle (black box in the lower right corner)
Drag down as far as you need (eg through cell A100).
(That will create a range of alternating numbers and blanks)

While A1:A100 is still selected....
Press [F5]..a shortcut for <edit><go to>
Click [Special]
Check: Blanks
Click [OK]

The even (blank) cells with be selected.

or...
Check: Constants
Click [OK]
to select the non-blank cells.

Is that something you can work with?
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)

"Ron Coderre" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
>I think if you describe what you utlimately want to do with those rows, we can probably suggest a solution that will work for you.
> --------------------------
>
> Regards,
>
> Ron (XL2003, Win XP)
> Microsoft MVP (Excel)
>
>
> "mmcclain" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>> In a large file, is it possible to select all even or odd rows quickly?

>
>
>



 
Reply With Quote
 
=?Utf-8?B?U3RlZmk=?=
Guest
Posts: n/a
 
      30th Oct 2007
My suggestion is to use Advanced filter:

Choose an empty helper column for criteria range, say Z!
Leave empty Z1, enter formula in Z2
=MOD(ROW(A2),2)=0 for even
=MOD(ROW(A2),2)=1 for odd row No!

Data/Filter/Advanced filter/Enter your used range as list range, Z1:Z2 as
criteria range/click OK!

Regards,
Stefi




„mmcclain” ezt *rta:

> In a large file, is it possible to select all even or odd rows quickly?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Different odd headers within different odd and even; Word 2003 Stefan Blom Microsoft Word Document Management 4 8th Nov 2012 05:15 PM
Adding the values on even rows/odd rows. gjfeng@yahoo.com Microsoft Excel Discussion 1 3rd Jun 2008 04:55 PM
How to select only odd/even numbered rows to be shaded =?Utf-8?B?U2tvdHQ=?= Microsoft Excel Misc 1 17th Oct 2005 11:42 AM
different color for odd rows and even rows sam Microsoft Access 1 4th Sep 2003 11:00 AM
odd behavior of first page/odd page/even page footers ken Microsoft Word New Users 3 4th Sep 2003 02:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:27 PM.