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.

Is 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.

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.

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

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.

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.

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

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

A little background as to how I came to I design this code:
Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications. You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…

The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…