Macro

  • Thread starter Thread starter Joan
  • Start date Start date
J

Joan

Hello,

I would like to create a macro that highlights a column
then sorts the column. My macro does not sort, it only
highlights the column. Would you have an idea why it does
not work ?

Thanks, Joan
 
Post the macro code..

--


For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom
 
Sub Macro6()
'
' Macro6 Macro
' Macro recorded 6/2/2004 by student12
'
' Keyboard Shortcut: Ctrl+f
'
Columns("B:B").Select
Range("B6").Activate
Range("A1:I14").Sort Key1:=Range("B2"),
Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
 
Works for me.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Copy/paste your macro here. Please do NOT attach the workbook.
Something like this should work to sort by the active column. I have one
assigned to a double click event.
[sortrange].Sort Key1:=Cells(1, ActiveCell.Column), Order1:=xlAscending,
Orientation:=xlTopToBottom
 
Back
Top