Macro

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
 
P

Peo Sjoblom

Post the macro code..

--


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

Regards,

Peo Sjoblom
 
G

Guest

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
 
B

Bob Phillips

Works for me.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
D

Don Guillett

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
 

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