Building a Chart that only shows top 3 losses.

TSing3

Board Regular
Joined
Jan 7, 2015
Messages
54
I currently have a data table that shows hours lost by factory line.

Column A contains all the downtime reasons (There are 15). Rows B2:W2 have all of the Line numbers. Finally B5:W21 have all of the data that shows all the losses by line for each downtime reason.

I want to build 1 chart where anyone can go in and select the line number and the chart will show their top 3 losses by reason. I tried using the LARGE function to pull out the 3 largest losses per line, but that only pulls the data, it does not pull the reason associated with that data.

I'm kind of at a loss.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi TSing3,

You can use the INDEX function to get the reason name from the same position in a column as something else in another column. The position of the item you looked up, here the Nth largest loss can be found with the formula MATCH. This INDEX/MATCH combination is often used in Excel instead of VLOOKUP because it gives you great flexibility, the two columns can be placed anywhere in your spreadsheet as long as they are the same size.

In your case, let's say you have factory-line5 in column F, data in F5:F19, to find the top 1-2-3 reason codes this would be your formula:
=INDEX(A5:A19,MATCH(LARGE(F5:F19,1),F5:F19,0))
=INDEX(A5:A19,MATCH(LARGE(F5:F19,2),F5:F19,0))
=INDEX(A5:A19,MATCH(LARGE(F5:F19,3),F5:F19,0))

If you want a dropdown selector for your users to select their factory line you could
- either use these formulas in just one place and define the reference to the range of data using INDIRECT (you'd have to have users select column letter or have named ranges setup for each factory line)
- or have these formulas at the bottom of each factory line's column and use other lookups (HLOOKUP or another INDEX/MATCH combination) to find the results for the particular factory line selected by the user
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,195
Members
453,021
Latest member
pingpong7117

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