Thread: Sorter macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Sorter macro

Just do the sort manually with the macro recorder turned on. You would want
to then modify the setting for the Key1 argument. It isn't clear what
labels are in row 72, so it is hard to provide specifics on how to find the
month specified in BG70 [sic]. Worst case you can loop along the row to
find it.

For the second, again, use the macro recorder. Since this will be static,
you shouldn't need any major modifications.

In each case you can modify the base range to be

Range("AG72").Currentregion

You will need to have a blank row and column surrounding your data, so you
need your drop down in BG70 rather than BG71.

--
Regards,
Tom Ogilvy


"scottwilsonx" wrote in message
...

Hello All, I would be grateful for any help with this.

I have a data range from AG72 to BD103 where row 72 is the header.
The range is cumulative, and calculates the results from another part
of the spreadsheet on a monthly basis, ie: AG is Apr-03 and BD will
contain Mar-05 (when it arrives)

What I would like to do is create a VBA macro that sorts the data by
the values in the most recent month. I would call this from cell BG71
by selecting from a validation drop-down list of months.

Is this macro possible? and if so how ?

Also, is it possible to have a second macro that would resort the data
alphabetically by the row contents in each row of column AG.

Hope this makes sense, and I look forward to your replies.
Thanks
Scott.


--
scottwilsonx
------------------------------------------------------------------------
scottwilsonx's Profile:

http://www.excelforum.com/member.php...o&userid=11128
View this thread: http://www.excelforum.com/showthread...hreadid=266032