Thread: Sort Macro
View Single Post
  #3   Report Post  
Big Tony
 
Posts: n/a
Default

I have this macro:

Sub SortCombo()
' This works on all worksheets
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Select
Range("A1").Select
Range("A1:A245").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Next ws
Application.ScreenUpdating = True
End Sub

I cannot figure out how to start in specified column (say column 8) where
columns are of different length in each worksheet. I know it has something
to do with the Columns() command maybe coupled with the With command.

" wrote:

what have you done so far to make them work?
if you pasted them in the vb editor then
toolsmacromacrosselect macrorun should do it.
or alt+F8select macrorun

-----Original Message-----
I would like to be able to sort the same column in all

worksheets in a
workbook. I found two macros that were similar in this

discussion group but
have not been able to make them work. The key column in

each worksheet has a
different number of rows but it is always the same column.

Thanks in advance for your assistance.
.