Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sorter macro


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 par
of the spreadsheet on a monthly basis, ie: AG is Apr-03 and BD wil
contain Mar-05 (when it arrives)

What I would like to do is create a VBA macro that sorts the data b
the values in the most recent month. I would call this from cell BG7
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 dat
alphabetically by the row contents in each row of column AG.

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

--
scottwilson
-----------------------------------------------------------------------
scottwilsonx's Profile: http://www.excelforum.com/member.php...fo&userid=1112
View this thread: http://www.excelforum.com/showthread.php?threadid=26603

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Database Style Vinyl Sorter SpeakaTweaka Excel Discussion (Misc queries) 1 August 11th 06 03:44 AM
Random List Sorter Sethnstorm Excel Discussion (Misc queries) 2 March 18th 06 04:04 AM
Column drop-down list sorter CMonroe329 Excel Discussion (Misc queries) 1 September 28th 05 07:57 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 02:02 AM.

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"