Is there existing macros or functions that I can perform the following
sampling logic?
I have a file with 500K transactions. Would like to start with a number and
select one transaction every 30 records. The total number of selected
transactions are 2000.
Thanks.
One way ..
Assume txn data is in col A, from A1 down to A65536
In B1 will be input the row start number, say: 3
Put in C1: =OFFSET(INDIRECT(quot;Aquot;amp;$B$1),ROW(A1)*30-30,)
Copy C1 down to C2000
C1:C2000 will return what's in: A3, A33, A63, ....
--
Max
Singapore
savefile.com/projects/236895
xdemechanik
---
quot;Miloannquot; gt; wrote in message
...
gt; Is there existing macros or functions that I can perform the following
gt; sampling logic?
gt;
gt; I have a file with 500K transactions. Would like to start with a number
and
gt; select one transaction every 30 records. The total number of selected
gt; transactions are 2000.
gt;
gt; Thanks.
gt;
gt;
Had presumed there was a typo (an extra zero?) in your line:
gt; gt; I have a file with 500K transactions.
(50K, not 500K lt;ggt;)
--
Max
Singapore
savefile.com/projects/236895
xdemechanik
---
Thanks a lot.
What if I want to save the extracted records into a new spreadsheet? Thanks
again.
quot;Maxquot; gt; wrote in message
...
gt; Had presumed there was a typo (an extra zero?) in your line:
gt;gt; gt; I have a file with 500K transactions.
gt; (50K, not 500K lt;ggt;)
gt; --
gt; Max
gt; Singapore
gt; savefile.com/projects/236895
gt; xdemechanik
gt; ---
gt;
gt;
quot;Miloannquot; wrote
gt; What if I want to save the extracted records into a new spreadsheet?
Assume source txn data is in Sheet1, from A1 down
In another sheet, say Sheet2:
Input the source sheetname in A1: Sheet1
Input the row start number in B1, say: 3
Then we could put in C1, the revised:
=OFFSET(INDIRECT(quot;'quot;amp;$A$1amp;quot;'!Aquot;amp;$B$1),ROW(A1)*30-30,)
and copy C1 down to C2000, as before
The above will extract the required results
--
Max
Singapore
savefile.com/projects/236895
xdemechanik
---
- Oct 05 Fri 2007 20:40
Sampling Program
close
全站熱搜
留言列表
發表留言