Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Create macro to calculate data range for a running chart

I need to create a running chart that will plot the production rate and
associated dates of four employees. I have seen examples of macros to
automatically resize a data range as new data is entered over time. That
accomplishes a portion of my problem but i also need a macro that will sort
the data by employee last name and then plot on a chart based on that sorted
data.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Create macro to calculate data range for a running chart

Lots of sort macros out there, on Google for instance
Here is one:
Sub macSort()
Range("A1:A22").Select ' put the range here
Selection.Sort Key1:=Range("A1"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
end sub

This is a great reference:
http://www.mvps.org/dmcritchie/excel/sorting.htm

Turn on the macro recorder and try it a few times yourself.

As for the dynamic range, all the info. you need is right he
http://www.ozgrid.com/Excel/DynamicRanges.htm
http://www.exceluser.com/explore/dynname1.htm


Regards,
Ryan--
--
RyGuy


"James Lucero" wrote:

I need to create a running chart that will plot the production rate and
associated dates of four employees. I have seen examples of macros to
automatically resize a data range as new data is entered over time. That
accomplishes a portion of my problem but i also need a macro that will sort
the data by employee last name and then plot on a chart based on that sorted
data.

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
HOW CAN I UPDATE DATA FROM INTERNET WITHOUT RUNNING MACRO lookup Excel Discussion (Misc queries) 2 April 23rd 08 10:15 PM
How do I create a dynamic range in a macro Mark2122 Excel Worksheet Functions 2 February 2nd 07 09:44 PM
create chart from non adjacent range rita Charts and Charting in Excel 1 September 15th 06 04:16 AM
Running a macro if any data is entered in a range of cells Jonathan Excel Worksheet Functions 3 November 16th 05 08:38 PM
How to create a chart based on a 2 dim data range dynamical in 1 d Beertje Charts and Charting in Excel 1 October 25th 05 11:54 AM


All times are GMT +1. The time now is 09:08 PM.

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

About Us

"It's about Microsoft Excel"