Sorting data and searching

M

msw

I have an Excel Spreadsheet in which one sheet that I created four columns
that contains the following:

Table Name, Tabel Description, Table Information, Table Type

Once I have enterred the table information, I highlighted the range of
information that I enterred and right-click and chose sort A-Z.

Everytime that I do this it is sorted by Table Name.

Here are my questions:

-How can I be sure that when I enter a new row that the information would be
sorted by the table name and How do I automate this (Can it be done in a
simple way)

-How can I search for a table name?

Thank you for your feedback.

Meezo
 
R

Roger Govier

Hi

The safest way of doing this (IMO) is
XL2003
Place cursor in top row of the table>Data>List>Create List>leave the check
mark in "My list has Headers"
As you add new rows, data won't get sorted automatically, but the header
cells will have a dropdown button.
Click the dropdown and choose Sort Ascending
Equally, use the dropdown to select any Table name you want.

XL2007
Insert tab>Table>my list has headers.
then Same as for XL2003
--
Regards
Roger Govier

msw said:
I have an Excel Spreadsheet in which one sheet that I created four columns
that contains the following:

Table Name, Tabel Description, Table Information, Table Type

Once I have enterred the table information, I highlighted the range of
information that I enterred and right-click and chose sort A-Z.

Everytime that I do this it is sorted by Table Name.

Here are my questions:

-How can I be sure that when I enter a new row that the information would
be sorted by the table name and How do I automate this (Can it be done in
a simple way)

-How can I search for a table name?

Thank you for your feedback.

Meezo


__________ Information from ESET Smart Security, version of virus
signature database 4738 (20100102) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4738 (20100102) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
M

Meezo

Thank you for your response.

I use Excel 2007. When I click on the tab for data, I can not find the
Create a List.

On the top of my list, I have a row that contains the names of each column.
Is this a header?

Can I give the table a name since I would like to use this table within each
sheet of the workbook?

Thank you.
 
R

Roger Govier

Hi

for XL2007, Insert tab>Table>my table has headers>OK
When you do this, a new Design tab will appear and in the top left corner in
the Properties section you will see Table name.
It will default to table 1 on first use, but you can change the name to
anything you want.
--
Regards
Roger Govier

Meezo said:
Thank you for your response.

I use Excel 2007. When I click on the tab for data, I can not find the
Create a List.

On the top of my list, I have a row that contains the names of each
column. Is this a header?

Can I give the table a name since I would like to use this table within
each sheet of the workbook?

Thank you.








__________ Information from ESET Smart Security, version of virus
signature database 4738 (20100102) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 4738 (20100102) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
D

Don Guillett

Right click sheet tab>view code>copy/paste this. Now when you enter data in
col C, col a:d will sort by col A. Maybe you want it to be on col D instead
of col C???
'=========
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
'Tested in xl2003 and xl2007
Dim lr As Long
If Target.Column <> 3 Or Target.Count > 1 Then Exit Sub
lr = Cells(Rows.Count, 1).End(xlUp).Row
Range("A1:D" & lr).Sort Key1:=Range("A2"), _
Order1:=xlAscending, Header:=xlYes, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
End Sub
'=========
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top