Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sort order for graph and not spreadsheet (dynamic)

Hi there! I neet to plot a simple graph with the data below

Candidate Score
A 4
B 3
C 7
D 1

The relevent numbers (are actually scores) keep getting updated for each
candidate. I want my graph to plot it in the order of highest score to
lowest (whilst keeping my spreadsheet in the same order A,B,C,D . . .)
every time I update the score (automatically) without me having to change it
everytime I do it.
I have 32 entries. Can I use a macro to do this
Can anyone pls help me plssssssssssss

Thanks so much in anticipation

Dharshanie


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sort order for graph and not spreadsheet (dynamic)

To the best of my knowledge, a graph can reverse the order, but it can't
sort. So the solution would be to put formulas in another location that
produce a sorted list and build your graph from that. This list could be on
a hidden sheet as an example.

--
Regards,
Tom Ogilvy

"Dharsh" wrote in message
...
Hi there! I neet to plot a simple graph with the data below

Candidate Score
A 4
B 3
C 7
D 1

The relevent numbers (are actually scores) keep getting updated for each
candidate. I want my graph to plot it in the order of highest score to
lowest (whilst keeping my spreadsheet in the same order A,B,C,D . . .)
every time I update the score (automatically) without me having to change

it
everytime I do it.
I have 32 entries. Can I use a macro to do this
Can anyone pls help me plssssssssssss

Thanks so much in anticipation

Dharshanie




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Sort order for graph and not spreadsheet (dynamic)

Tom Ogilvy wrote:
To the best of my knowledge, a graph can reverse the order, but it
can't sort. So the solution would be to put formulas in another
location that produce a sorted list and build your graph from that.
This list could be on a hidden sheet as an example.


what if the second range is sorted automatically by an worksheet-change
event? would that change the chart, too?

I thought about using formulas as you mentioned (eg. with rank),
however, what if two have the same rank?

arno

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Sort order for graph and not spreadsheet (dynamic)

"Tom Ogilvy" wrote in message
...
To the best of my knowledge, a graph can reverse the order, but it can't
sort. So the solution would be to put formulas in another location that
produce a sorted list and build your graph from that. This list could be
on
a hidden sheet as an example.


Or use a pivot table/chart.

If you have a table with 2 columns entitles "Candidate" and "Score":
Cretae a pivot chart/table by selecting one cell in the data table and going
datapivot table and pivot chart report in the menus.
Select Pivot chart with pivot table then Next
Next if the data range is ok
Layout
Drag "Candidate" to the row section and "Score" to the data section
Double click the "Candidate" field that you have dragged into the "Row"
section. Choose advanced and change the autosort to "ascending" and the
field to sort to "Score" (it will probably say "sum of score", this doesn't
matter if there's only 1 score for each candidate).
Then OK, OK, OK, finish.
This will give you a pivot table and chart (bar chart by default, you can
shange it) sorted by "score" in ascending order.
you can then format it to suit.
To refresh the data when you change it just right click the pivot table and
select refresh or make a button on the pivot sheet with;

Sub DeodoriseMyPivotTable()

ActiveSheet.PivotTables("<whatever you pivot table is
called").PivotCache.Refresh

End Sub

HTH

Damo



--
Regards,
Tom Ogilvy

"Dharsh" wrote in message
...
Hi there! I neet to plot a simple graph with the data below

Candidate Score
A 4
B 3
C 7
D 1

The relevent numbers (are actually scores) keep getting updated for each
candidate. I want my graph to plot it in the order of highest score to
lowest (whilst keeping my spreadsheet in the same order A,B,C,D . . .)
every time I update the score (automatically) without me having to change

it
everytime I do it.
I have 32 entries. Can I use a macro to do this
Can anyone pls help me plssssssssssss

Thanks so much in anticipation

Dharshanie






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sort order for graph and not spreadsheet (dynamic)

what if the second range is sorted automatically by an worksheet-change
event? would that change the chart, too?


Yes it would.

The limitations of Rank can be overcome.

--
Regards,
Tom Ogilvy

"arno" wrote in message
...
Tom Ogilvy wrote:
To the best of my knowledge, a graph can reverse the order, but it
can't sort. So the solution would be to put formulas in another
location that produce a sorted list and build your graph from that.
This list could be on a hidden sheet as an example.


what if the second range is sorted automatically by an worksheet-change
event? would that change the chart, too?

I thought about using formulas as you mentioned (eg. with rank),
however, what if two have the same rank?

arno



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
Sort order on very large spreadsheet. Dennis1188 Excel Discussion (Misc queries) 4 May 31st 07 05:32 PM
Can I save a custom sort order for a specific spreadsheet? BarKay Excel Worksheet Functions 1 March 14th 07 03:19 PM
how do I set up a excel spreadsheet to auto sort data in order jason Excel Discussion (Misc queries) 0 January 3rd 06 07:17 PM
Sort order for chart only and not on spreadsheet Dharsh Charts and Charting in Excel 3 May 27th 05 03:38 AM
Sort order for graph only and not spreadsheet Dharsh Excel Discussion (Misc queries) 2 May 25th 05 12:40 PM


All times are GMT +1. The time now is 10:26 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"