PDA

View Full Version : Auto Update/Sort



Hoopsah
12-05-2007, 07:49 AM
Hi,

I have a database created within Excel, this database will get added to each day.

It has to be sorted on about 3 different fields.

Is there any macro I could use that will get this database updated without having to run the sort command?

ProteanBeing
12-05-2007, 10:19 AM
use the sort method

example

worksheets("Name of Sheet").range("A1:C1000").sort

(see the help file in VBA for the sort parameters)

or if you want to generalize the end of the list:

worksheets("Name of Sheet").range(cells(1,1), cells(last_row, 3)).sort