close

Hello All,

I am entering some database information into an excel
spreadsheet--namely, clients' names, addresses, phone #s, etc. I know
how to make excel alphabetize all the data according to the name
column. However, there are many duplicates that I come accross, and
so, I find myself having to alphabetize after every entry. Is there
any way to make excel alphabetize every time i move to the next row?
Thanks,

-Michael--
tomcat017
------------------------------------------------------------------------
tomcat017's Profile: www.excelforum.com/member.php...oamp;userid=30911
View this thread: www.excelforum.com/showthread...hreadid=505886Hi Michael,

Perhaps an event macro like this will do.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column lt;gt; 1 Then Exit Sub
Range(quot;A:Aquot;).Sort Key1:=Range(quot;A1quot;), Order1:=xlAscending
End Sub

HTH
Regards,
Howard

quot;tomcat017quot; gt; wrote
in message ...
gt;
gt; Hello All,
gt;
gt; I am entering some database information into an excel
gt; spreadsheet--namely, clients' names, addresses, phone #s, etc. I know
gt; how to make excel alphabetize all the data according to the name
gt; column. However, there are many duplicates that I come accross, and
gt; so, I find myself having to alphabetize after every entry. Is there
gt; any way to make excel alphabetize every time i move to the next row?
gt; Thanks,
gt;
gt; -Michael
gt;
gt;
gt; --
gt; tomcat017
gt; ------------------------------------------------------------------------
gt; tomcat017's Profile:
gt; www.excelforum.com/member.php...oamp;userid=30911
gt; View this thread: www.excelforum.com/showthread...hreadid=505886
gt;
It is possible to have the alphabetical list updated after every entry.
In J1 enter 1, in K1 enter 2, and in L1 enter 3.
Let your data be contained in A2:C15: surnames in column A, addresses in
column B and telephone numbers in column C.
Cell E2: =SUMPRODUCT(--($A$2:$A$15lt;$A2))
Cell F2: =IF(ISBLANK(A2)=TRUE,ROW()*1000,E2 ROW()/1000)
Cell G2: =RANK($F2,$F$2:$F$15,5)
Cell H2: =ROW(G2)-ROW($G$2) 1
Cell I2: =MATCH($H2,$G$2:$G$15,0)
Cell J2: =INDEX($A$2:$C$7,$I2,J$1)
Copy J2 to K2 and L2
Copy E2:L2 to E2:L15.
Make refinements to suit your needs, for example you could have the
alphabetical list on a different worksheet, and you also probably want to get
rid of the error cells and the zeroes (use an IF function). Also, this is
only a sample list with a maximum of 14 entries. Extend the range to what
you require.

quot;L. Howard Kittlequot; wrote:

gt; Hi Michael,
gt;
gt; Perhaps an event macro like this will do.
gt;
gt; Private Sub Worksheet_SelectionChange(ByVal Target As Range)
gt; If Target.Column lt;gt; 1 Then Exit Sub
gt; Range(quot;A:Aquot;).Sort Key1:=Range(quot;A1quot;), Order1:=xlAscending
gt; End Sub
gt;
gt; HTH
gt; Regards,
gt; Howard
gt;
gt; quot;tomcat017quot; gt; wrote
gt; in message ...
gt; gt;
gt; gt; Hello All,
gt; gt;
gt; gt; I am entering some database information into an excel
gt; gt; spreadsheet--namely, clients' names, addresses, phone #s, etc. I know
gt; gt; how to make excel alphabetize all the data according to the name
gt; gt; column. However, there are many duplicates that I come accross, and
gt; gt; so, I find myself having to alphabetize after every entry. Is there
gt; gt; any way to make excel alphabetize every time i move to the next row?
gt; gt; Thanks,
gt; gt;
gt; gt; -Michael
gt; gt;
gt; gt;
gt; gt; --
gt; gt; tomcat017
gt; gt; ------------------------------------------------------------------------
gt; gt; tomcat017's Profile:
gt; gt; www.excelforum.com/member.php...oamp;userid=30911
gt; gt; View this thread: www.excelforum.com/showthread...hreadid=505886
gt; gt;
gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()