On Nov 6, 4:15 am, Paul Schreiner <schreiner_p...@att.net> wrote:
> So you're saying that if you select a cell,
> the data will be re-sorted with the column of the active cell
> being the primary (or only?) sort field?
That is correct.

> should be simple enough using a selection_change event.
> use target.column to get the column number for the sort.
>
> you would also want to check to see that the target.count = 1
> (in case multiple cells are selected)
>
> Are you familiar enough with VBA to do this? or do you need more assistance?
I absolutely do need help as I'm only a self-taught beginner. This
task I am trying
to implement is within a running program performing other tasks after
this step.
Therefore, I dont't want to stop it and read the column where the
active cell (single) happens
to be. Normally, the sorting process starts with:
Selection.Sort Key1:=Range("whatever is chosen"), ........
Wonder if the following would work?:
Selection.Sort Key1:=ActiveCell, ...........

> Paul
>
>
>
> ----- Original Message ----
> > From: Tom <tcli...@gmail.com>
> > To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com>
> > Sent: Fri, November 5, 2010 8:38:06 AM
> > Subject: $$Excel-Macros$$ How to sort database
>
> > My dataset occupies 50 rows by 20 columns which I defined as my
> > "database".
> > There is no difficulty if I choose to sort the "database" either by a
> > known column or row.
> > But what I really want the program to do is to sort it by column
> > wherever the active cell
> > happens to be - whose location is unknown. Can anyone figure out how
> > this could
> > be done?
>
> > TIA,
> > Tom
>
> > --
> >--------------------------------------------------------------------------­--------
> >-
> > Some important links for excel users:
> > 1. Follow us on TWITTER for tips tricks and links :
> >http://twitter.com/exceldailytip
> > 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310
> > 3. Excel tutorials athttp://www.excel-macros.blogspot.com
> > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com
> > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com
>
> > To post to this group, send email to excel-macros@googlegroups.com
>
> > <><><><><><><><><><><><><><><><><><><><><><>
> > Like our page on facebook , Just follow below link
> >http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&...- 
> >Hide quoted text -
>
> - Show quoted text -

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts

Reply via email to