LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Customizing "sort" macro

Try

Set rng = application.,Inputbox("Use the mouse to select a column",
Type:=8)
If not rng Is Nothing then
inputcol = rng.Column
End If

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"markx" wrote in message
...
Hello guys,
Just one quick question concerning "Sort" macro...

I have the following code:

Sub SortAscending()
Range("A1:A10000").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range( _
"E1"), Unique:=True
Range("E1:E10000").Select
Selection.SpecialCells(xlCellTypeBlanks).Delete (xlShiftUp)
Range("E1:E10000").Sort Key1:=ActiveCell, Order1:=xlAscending,

Header:=
_
xlYes
End Sub

What I would like to do is to give the user the opportunity to

choose/adapt
input and output columns, f. ex. with small window apprearing and asking:
Input column? ...
Output column? ...

Is it something easy to do?
Do you have other (better) ideas how to achieve this?

Many thanks,
Mark




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing sort ascending or descending when go into "data" "sort"? Jason Excel Discussion (Misc queries) 5 September 17th 08 11:57 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Customizing "blank workbook" NN Setting up and Configuration of Excel 3 January 29th 08 07:51 AM
pictures to work with "data" "sort" option arad Excel Discussion (Misc queries) 1 April 18th 06 09:15 PM
can I sort using column headings, in a macro, not "a1" John Excel Programming 4 October 23rd 04 05:02 PM


All times are GMT +1. The time now is 03:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"