Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mary
 
Posts: n/a
Default How do I create a sample in Excel?

I am trying to create a sample, needing every 20th record out of around 3000
records.
  #2   Report Post  
Chip Pearson
 
Posts: n/a
Default

Mary,

You need a VBA procedure.

Sub AAA()
Dim RowNdx As Long
Dim DestRng As Range
Set DestRng = Worksheets("Sheet2").Range("A1")
For RowNdx = 1 To 3000 Step 20
Rows(RowNdx).Copy Destination:=DestRng
Set DestRng = DestRng(2, 1)
Next RowNdx
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Mary" wrote in message
...
I am trying to create a sample, needing every 20th record out of
around 3000
records.



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
How do I create a macro, that references another excel file ??? Aries Excel Worksheet Functions 1 May 25th 05 11:37 AM
create excel spreadsheet to display data from filled text forms pluck4me Excel Discussion (Misc queries) 0 April 20th 05 08:37 PM
Create New Microsoft Excel Worksheet Has 3 Sheets Bassam Setting up and Configuration of Excel 0 February 9th 05 08:51 PM
create price list from excel sheet -keevill- Excel Discussion (Misc queries) 1 February 8th 05 12:02 AM
how do I create qif files from Excel for import into Quicken? pb Excel Discussion (Misc queries) 2 January 16th 05 12:31 AM


All times are GMT +1. The time now is 07:56 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"