<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>RE: extracting a subTable</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">sorry,</FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">The data got out of order on the email.. Here is the data in a spreadsheet.</FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Jorge</FONT>
<BR><FONT FACE="Arial" SIZE=2 COLOR="#000000"> <<test.xls>> </FONT>
<BR><FONT SIZE=1 FACE="Tahoma">_____________________________________________ </FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">From: </FONT></B> <FONT SIZE=1 FACE="Tahoma">Jorge Nieves </FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Sent: </FONT></B> <FONT SIZE=1 FACE="Tahoma">Wednesday, January 14, 2009 04:30 PM</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">To: </FONT></B> <FONT SIZE=1 FACE="Tahoma">r-sig-finance@stat.math.ethz.ch</FONT>
<BR><B><FONT SIZE=1 FACE="Tahoma">Subject: </FONT></B> <FONT SIZE=1 FACE="Tahoma">extracting a subTable</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I have a BIG table with data organized by ID, see example on Table#1 bellow. I would like to extract a smaller table with the same number of columns. The rows should include only the last ROW of each ID. Table# 2 is an example extracted form table #1. I tried using the SUBSET function and plan to loop, but I was wondering if someone out there has a more efficient way to accomplish this.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">You recommendations are highly appreciated.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Jorge</FONT>
<P ALIGN=RIGHT> <BR>
<B> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Table # 1 </FONT></B> <B> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Table # 2 </FONT></B> <BR>
<B> <FONT COLOR="#FFFFFF" SIZE=2 FACE="Arial">Seq ID X1 X2 </FONT></B> <B> <FONT COLOR="#FFFFFF" SIZE=2 FACE="Arial">Seq ID X1 X2 </FONT></B> <BR>
<FONT COLOR="#000000" SIZE=2 FACE="Arial">1 15 -616 796 12 15 -148 878 <BR>
2 15 -661 -455 20 20 -515 1,802 <BR>
3 15 -355 -1,639 27 45 -138 179 <BR>
4 15 -1,226 -97 34 70 1,348 840 <BR>
5 15 506 985 <BR>
6 15 -612 76 <BR>
7 15 947 122 <BR>
8 15 -45 1,980 <BR>
9 15 295 -1,827 <BR>
10 15 1,490 -743 <BR>
11 15 115 1,283 <BR>
12 15 -148 878 <BR>
13 20 359 1,297 <BR>
14 20 -185 -430 <BR>
15 20 481 800 <BR>
16 20 1,567 874 <BR>
17 20 2,365 -167 <BR>
18 20 1,636 1,649 <BR>
19 20 -2,741 337 <BR>
20 20 -515 1,802 <BR>
21 45 90 624 <BR>
22 45 -221 345 <BR>
23 45 -2,168 -1,734 <BR>
24 45 1,056 -1,070 <BR>
25 45 678 -80 <BR>
26 45 1,747 -74 <BR>
27 45 -138 179 <BR>
28 70 1,152 -3,167 <BR>
29 70 -802 -337 <BR>
30 70 -388 263 <BR>
31 70 812 342 <BR>
32 70 -576 972 <BR>
33 70 653 -737 <BR>
34 70 1,348 840 <BR>
<BR>
<BR>
</FONT><FONT SIZE=2 FACE="Arial">Jorge Nieves</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Phone 212.782.7083</FONT>
<BR><FONT SIZE=2 FACE="Arial">Fax 212.642.7644</FONT>
</P>
</BODY>
</HTML>