Tough One

dantheram

Board Regular
Joined
Aug 27, 2010
Messages
192
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Here is my problem;

I have a graph with 5 different data sets which is controlled by a drop down menu. This drop down links back to an offset which changes the source data for the chart.

I wish the chart to display the data in the offset cells in descending order, at present it is locked to the order of the source data.

For example;

Stock Count (data set 1)

Stock a - 12
Stock b - 7
Stock c - 5

Sales Count (data set 2)

Stock a - 1
Stock b - 100
Stock c - 20

In the above when i switch from stock to sales my graph will follow the order above, i wish it shift the data into descending order automatically.

Is this possible?
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
You can use a LARGE function to make the offset work like you want, for example:


Excel Workbook
ABCDEFG
1Data Sets12345
2Stock a121174564
3Stock b7100319964
4Stock c5209159
5
6Data Set12345
7
8121001719964
972094564
10513159
sheet
 
Upvote 0
Hi dantheram,

If I understand you correctly, you are looking to sort a chart based on the values of the Sales or Count.

Assuming your Categories are in A2 and the Value is in B2, you can copy and paste this formula into a range that you can chart:

=INDEX(A$2:A$4,MATCH(LARGE($B$2:$B$4,ROW($A1)),$B$2:$B$4,0))

It sorts the data in decending order and you can chart that area.

Steve=True
www.exceldashboardtemplates.com
 
Upvote 0
Hi dantheram,

Why not just tell the chart to display the values in reverse order? To do this, select the category (abscissa) axis > Properties > Scale tab > check the Categories in reverse order checkbox.

This reverse order property can also be set using VBA, so it could be called from your combobox's code.

Damon
 
Upvote 0
Thanks for all the solutions.

I made a work around using;

=MATCH(J3,OFFSET($A$2,$A$25,$A$26,11,1),0)

and then taking the value generated (1 to 11 for my 11 categories) and then employed choose to change the number back to the actual text value for the category.

:biggrin:
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,304
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top