Setofskills
New Member
- Joined
- Aug 17, 2015
- Messages
- 9
I have data (on a table aptly named 'Data') for region, department, sub-department and profit/loss. I've made a drop-down list in cells A1, A2, A3, which filter respectively for region, department, and sub-department. Each drop-down list includes an option for no filter - an "All" option.
I'd like to create a list of all top 10 largest losses. I originally had just one drop-down tab and successfully used the array formula below, then used a vlookup to get all the other data I needed to report on:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]All[/TD]
[TD]Region[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]All[/TD]
[TD]Group[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]All[/TD]
[TD]Subgroup[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Loss[/TD]
[TD]Region[/TD]
[TD]Group[/TD]
[TD]Department[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]1[/TD]
[TD](Formula below in here)[/TD]
[TD]VLookup on C5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Cell C5: {=IF($A$1="All", SMALL(Data!$V:$V,B5),SMALL(IF(Data!$G:$G=$A$1,Data!$V:$V),B5))}
Here, Data!$V:$V is the profit column. Data!G is the region column. I had one drop down list in A1 and Column C was just 1, 2, 3, etc to highlight the top 10 biggest losses.
I struggle with array functions and am unsure how to add the functionality for a second or third condition. I'd also like to require the profit that is returned to only return if it is less than zero. Any help would be greatly appreciated!
I'd like to create a list of all top 10 largest losses. I originally had just one drop-down tab and successfully used the array formula below, then used a vlookup to get all the other data I needed to report on:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]All[/TD]
[TD]Region[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]All[/TD]
[TD]Group[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]All[/TD]
[TD]Subgroup[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Loss[/TD]
[TD]Region[/TD]
[TD]Group[/TD]
[TD]Department[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]1[/TD]
[TD](Formula below in here)[/TD]
[TD]VLookup on C5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Cell C5: {=IF($A$1="All", SMALL(Data!$V:$V,B5),SMALL(IF(Data!$G:$G=$A$1,Data!$V:$V),B5))}
Here, Data!$V:$V is the profit column. Data!G is the region column. I had one drop down list in A1 and Column C was just 1, 2, 3, etc to highlight the top 10 biggest losses.
I struggle with array functions and am unsure how to add the functionality for a second or third condition. I'd also like to require the profit that is returned to only return if it is less than zero. Any help would be greatly appreciated!