automatic sorting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

can somebody pse help me out?
how can I automate the sorting (in ascending or desc. order) columnA
(variable lenght) containing mixed multiple text and/or number values (even
blank ones) so, that in colF will be the sorted list of unique values and
colG will show how many times this value figures in the unsorted list

many thanks in advance
 
Put this in your workbook and create a button that calls it.

'/======================================/
Sub MySort()
Selection.Sort _
Key1:=Range("F2"), Order1:=xlAscending, _
Key2:=Range("G2"), Order2:=xlAscending, _
Header:=xlYes, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
End Sub
'/======================================/
HTH,
 
Hi Gary,

I do thank you for the suggestion, but my weakness in VBA won't let me out
from the 400 error (I created the button, pasted the code, saved, selected
column A3:A100 to sort, used the button and got the error400).
Can you pse advise how to proceed further?

I wonder is there any worksheet function combination to accomplish this
task?Can anybody help with this?

Thx
 
Hi Gary,

I do thank you for your suggestion, but my weakness in VBA trapped me (I
created the button, pasted the code, saved the workbook, selected the A3:A110
to be sorted, but the error400 keeps coming up.
Can you pse advise, how to proceed further.

I wonder, is there any combination of worksheet functions to accomplish this
task?

Thx
 

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

Back
Top