Small function with multiple conditions

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:

AllRegion
AllGroup
AllSubgroup
LossRegionGroupDepartment
1(Formula below in here)VLookup on C5
2
3
4
5

<tbody>
</tbody>

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!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,214,929
Messages
6,122,317
Members
449,081
Latest member
tanurai

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