Hi,

I am having trouble finding examples of code to where I can sort an excel spreadshet by multiple columns at one time.

The code I'm using for sorting one at a time is as follows:

excelApp.Worksheets("Temp").UsedRange.Sort excelApp.Range("A1"),xlAscending

What do I have to add to this to sort by column b as well?

An example of what I'm trying to do...Say there are 50 people divided in to 5 teams. Column A is their team Number and Column B is their last name. I want to sort them first by their Team Number then Second by their last name. This is really easy to do in excel using their sort tool, but I am generating a ton of reports through this code and it would be a pain to have to do this manually for each report.

Thanks for any help you can provide in advance.

DL