Solved

Sort Data in a Bar Chart

Posted on 2012-03-20
6
340 Views
Last Modified: 2012-03-20
I have a bar chart where I want to show how many people answered a question with possible answers A, B, C, D. I can use a table to generate this in excel.
	
        A	B	C	D
1	15	15	10	10
2	20	20	5	5
3	5	15	20	10
4	7	3	30	10
5	10	13	7	20
6	20	5	5	20
7	15	10	10	15
8	15	8	5	22
9	10	5	25	10
10	3	10	5	30

Open in new window

Current Chart SampleIs there any way to sort the order of the displayed results such that if B is the "Correct" answer that it will be the first result so the row has B, A, C, D etc.
Basically I want to push the correct total to the front.
0
Comment
Question by:stopher2475
  • 4
  • 2
6 Comments
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
One option would be to use a separate data table for the graph, ordering the columns in the correct order.

The data table would be formula driven:

G     H
1      B
2  1    =vlookup($G2,$A$1:$E$12,MATCH(H$1,$A$1:$E$1,0),FALSE)
3  2
4  3

This would lookup the value of column 1 (1 - 10) and match the value in row 1 (A - D) in the table. If the column "Headers" are then in the relevant order, the data will effectively be sorted for the graph.

If you upload a sample, I can put it in place in a sample.

Thanks
Rob H
0
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
Sample was easy to copy from question.

See attached. Change headers in H1:K1.

Thanks
Rob H
Sort-Chart.xls
0
 
LVL 2

Author Comment

by:stopher2475
Comment Utility
Sorry. I don't think I was clear. There is the possibility that any of the 4 letters is the correct answer and if so I'd like to get it to the beginning of the bar chart. Not sure if this is possible in Excel.
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
Put the letters in the required order across the top and the relevant scores will be displayed in the formula table below, thus putting the scores in the "correct" order.

By beginning of the bar chart, I assume you mean the series that starts at zero; the furthest left.

Rob H
0
 
LVL 31

Accepted Solution

by:
Rob Henson earned 500 total points
Comment Utility
Ahhh!  Do you mean that the correct answer for each question could be different and thus needing the correct answer for each question to be first and not all questions as a whole??

I think that's still possible but you would need a correct answer for each question specified somewhere.

See attached.
Sort-Chart.xls
0
 
LVL 2

Author Closing Comment

by:stopher2475
Comment Utility
I think you're as close as it's gonna get. The system the client used for their other reporting did it a little differently but required a lot more development.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now