<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Array sorting</TITLE>
<META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=934264312-07082003><FONT face=Arial color=#0000ff size=2>How do
you plan to handle A11, A12, A20, A21, etc.? As strings these won't sort
in the order that they appear in Excel. You'll probably be better off using a two dimension array, one for the column (alpha) and one for the row
(numeric), and concatenate them as strings when you need
them.</FONT></SPAN></DIV>
<DIV><SPAN class=934264312-07082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=934264312-07082003><FONT face=Arial color=#0000ff
size=2><code></FONT></SPAN></DIV>
<DIV><SPAN class=934264312-07082003><FONT face=Arial color=#0000ff
size=2>Function RangeNameToArray()<BR>Dim i As Integer<BR>Dim j As
Integer<BR>Dim iNumCols As Integer<BR>Dim iNumRows As Integer<BR>Dim
arrExcelRange() As String</FONT></SPAN></DIV>
<DIV><SPAN class=934264312-07082003><FONT face=Arial color=#0000ff
size=2><BR> 'Get the number of cols and
rows<BR> 'you'll have to write code to parse the range to determine which values to use here<BR> 'this codes uses your
sample range A1:C3<BR> iNumCols = Asc("C") -
Asc("A")<BR> iNumRows = 3 - 1<BR> ReDim
arrExcelRange(iNumCols, iNumRows)<BR> For i = 0 To
iNumCols<BR> For j = 0 To
iNumRows<BR>
arrExcelRange(i, j) = (Chr(65 + i)) & CStr(j +
1)<BR>
Debug.Print arrExcelRange(i, j)<BR>
Next j<BR> Next i<BR>End Function</FONT></SPAN></DIV>
<DIV><SPAN class=934264312-07082003><SPAN class=934264312-07082003><FONT
face=Arial color=#0000ff size=2></code></FONT></SPAN></SPAN></DIV>
<P><FONT face=Arial><FONT size=2><SPAN
class=934264312-07082003>HTH</SPAN>,</FONT></FONT> </P>
<P><FONT face=Arial size=2>Jim DeMarco</FONT> <BR><FONT face=Arial
size=2>Director of Product Development</FONT> <BR><FONT face=Arial
size=2>HealthSource/Hudson Health Plan</FONT> </P>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Powell, David (BBM) [mailto:david.powell@bbm.wapl.com.au]<BR><B>Sent:</B> Wednesday, August 06,
2003 10:41 PM<BR><B>To:</B> AccessD<BR><B>Subject:</B> [AccessD] Array
sorting<BR><BR></FONT></DIV><!-- Converted from text/rtf format -->
<P><FONT face=Arial size=2>Hi Listers,</FONT> </P>
<P><FONT face=Arial size=2>I have a single dimension array of excel cell
references stored as string values. I was wondering how you can sort a
range that is say A1:C3 from A1, A2, A3, B1… C3 to A1, B1, C1, A2, B2…C3? Any help would be greatly appreciated.</FONT></P><BR>
<P><SPAN lang=en-us><FONT face=Arial size=2>regards</FONT></SPAN> </P>
<P><SPAN lang=en-us><FONT face=Arial size=2>David</FONT></SPAN> </P>
<P><SPAN lang=en-us><B><FONT face=Tahoma color=#008080
size=1>----------------------------------------------------</FONT></B></SPAN>
<BR><SPAN lang=en-us><B><FONT face=Tahoma color=#008080 size=1>David
Powell</FONT></B></SPAN> <BR><SPAN lang=en-us><B><FONT face=Tahoma
color=#008080 size=1>Computing Support Officer</FONT></B></SPAN> <BR><SPAN
lang=en-us><B><FONT face=Tahoma color=#008080 size=1>Worsley Alumina Pty
Ltd</FONT></B></SPAN> <BR><SPAN lang=en-us><B><FONT face=Tahoma color=#008080
size=1>Bauxite Mine</FONT></B></SPAN> <BR><SPAN lang=en-us><B><FONT face=Tahoma color=#008080 size=1>Boddington WA 6390</FONT></B></SPAN>
<BR><SPAN lang=en-us><B><FONT face=Tahoma color=#008080 size=1>Ph: +61 8 9734
8269</FONT></B></SPAN> <BR><SPAN lang=en-us><B><FONT face=Tahoma color=#008080
size=1>FAX: +61 8 9734 8250</FONT></B></SPAN> <BR><SPAN
lang=en-us><B></B></SPAN><A href="Mailto:david.powell@bbm.wapl.com.au"><SPAN
lang=en-us><B><U></U><U><FONT face=Tahoma color=#0000ff
size=1>Mailto:david.powell@bbm.wapl.com.au</FONT></U></B></SPAN></A><SPAN
lang=en-us><B></B></SPAN> <BR><SPAN lang=en-us><B><FONT face=Tahoma color=#008080 size=1>WAPL Web Page</FONT> </B></SPAN><A
href="http://www.wapl.com.au"><SPAN lang=en-us><B><U></U><U><FONT face=Tahoma
color=#0000ff size=1>http://www.wapl.com.au</FONT></U></B></SPAN></A><SPAN
lang=en-us><B></B></SPAN> <BR><SPAN lang=en-us><B><FONT face=Tahoma color=#008080
size=1>----------------------------------------------------</FONT></B></SPAN><B><SPAN
lang=en-au></SPAN></B><SPAN lang=en-au></SPAN><SPAN lang=en-au></SPAN><SPAN
lang=en-au></SPAN> <BR><SPAN lang=en-au><FONT face=Arial color=#000000
size=2><<Powell, David (BBM).vcf>> </FONT></SPAN></P><FONT size=3><BR><BR>NOTICE - This message and any attached files may contain
information that is confidential and/or subject of legal privilege
<BR>intended only for use by the intended recipient. If you are not the intended recipient or the person responsible for delivering <BR>the message to
the intended recipient, be advised that you have received this message in error and that any dissemination, <BR>copying or use of this message or attachment is strictly forbidden, as is the disclosure of the information
therein. <BR>If you have received this message in error please notify the sender immediately and delete the message<BR>Worsley Alumina Pty Ltd ABN 58
008 905 155 is the manager of the Worsley Joint Venture - Bauxite/Alumina Operation.<BR>Liability and responsibility of the Joint Venturers is several
in accordance with the following schedule of participating
interests:<BR>Billiton Aluminium (RAA) Pty Ltd 56 percent, Billiton Aluminium
(Worsley) Pty Ltd 30 percent, <BR>Kobe Alumina Associates (Australia) Pty Limited 10 percent, Nissho Iwai Alumina Pty Limited 4
percent.<BR></BLOCKQUOTE></FONT><FONT SIZE=3><BR>
<BR>
***********************************************************************************<BR>
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You".<BR>
***********************************************************************************<BR>
</FONT>
</BODY></HTML>