Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default Select each alternate row in a worksheet

Hi all,

Could I select each alternate row in my seleceted range of a worksheet,
there is any way to do this.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Select each alternate row in a worksheet

Try this macro:

Sub everyothre()
Set s = Selection
r1 = s.Cells(1, 1).Row
r2 = s.Rows.Count + r1 - 1
Set cmp = s.Cells(1, 1).EntireRow
For i = r1 To r2 Step 2
Set parts = Cells(i, 1).EntireRow
Set cmp = Union(cmp, parts)
Next
Set cmp = Intersect(cmp, s)
cmp.Select
End Sub

--
Gary''s Student - gsnu200798


"Abdul Shakeel" wrote:

Hi all,

Could I select each alternate row in my seleceted range of a worksheet,
there is any way to do this.

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 I create a worksheet menu to select each other worksheet pippagrace Excel Discussion (Misc queries) 4 June 23rd 06 01:28 PM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 5th 05 12:03 AM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 4th 05 11:59 PM
Select alternate rows to copy Christina Excel Discussion (Misc queries) 4 January 27th 05 01:05 AM
select worksheet to run macro Hidaya Excel Discussion (Misc queries) 5 December 1st 04 11:54 PM


All times are GMT +1. The time now is 05:23 PM.

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"