SMALL Formula not Working with Index and Match

marvin jones

Board Regular
Joined
Mar 16, 2016
Messages
86
Hi All,

I have the formula below which looks at the smallest 3 values in a pivot table (column CT) and returns with the employee name (column CS)

=IF(ISERROR(INDEX('Bradford - Data'!$CS:$CS,MATCH(SMALL('Bradford - Data'!$CT:$CT,1),'Bradford - Data'!$CT:$CT,0))),"TBC",(INDEX('Bradford - Data'!$CS:$CS,MATCH(SMALL('Bradford - Data'!$CT:$CT,1),'Bradford - Data'!$CT:$CT,0))))

However, this formula returns with the same name 3 times. I don't have this issue when applying the LARGE formula.

Is this to do with there being a series of no values in the pivot column (due to the employee not working)?

What is an alternative formula to get the smallest values?

Thanks,
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
The ranges will be added to as the months go by with extra employees - CT refers to April, CU refers to May and so on - therefore the range cannot be fixed and needs to be flexible.
 
Upvote 0
Hi Aladin,

Numbers are from CT to DE. When the month of April is added a new column is created which in this case will be DF.
Employee Names is just CS only.

Thanks,
 
Upvote 0
Numbers are

CT6:CT740
CU6:CU740
CV6:CV740
CW6:CW740
CX6:CX740
CY6:CY740
CZ6:CZ740
DA6:DA740
DB6:DB740
DC6:DC740
DD6:DD740
DE6:DE740

Names are

CS6:CS740

Thanks
 
Upvote 0
Numbers are

CT6:CT740
CU6:CU740
CV6:CV740
CW6:CW740
CX6:CX740
CY6:CY740
CZ6:CZ740
DA6:DA740
DB6:DB740
DC6:DC740
DD6:DD740
DE6:DE740

Names are

CS6:CS740

Thanks

Thanks. What follows implements the formula in A2 of Sheet1. The associated values are not shown.

In A2 control+shift+enter, not just enter, and copy down:

=IF(ROWS(A$2:A2)>COUNTIFS('Bradford - Data'!CT$6:CT$12,"<="&SMALL('Bradford - Data'!CT$6:CT$12,MIN(3,COUNT('Bradford - Data'!CT$6:CT$12)))),"",INDEX('Bradford - Data'!$CS$6:$CS$12,SMALL(IF('Bradford - Data'!CT$6:CT$12=SMALL('Bradford - Data'!CT$6:CT$12,ROWS(A$2:A2)),ROW('Bradford - Data'!CS$6:CS$12)-ROW('Bradford - Data'!CS$6)+1),SUM(IF(SMALL('Bradford - Data'!CT$6:CT$12,ROW('Bradford - Data'!CS6:CS6)-ROW('Bradford - Data'!CS$6)+1)=SMALL('Bradford - Data'!CT$6:CT$12,ROWS(A$2:A2)),1)))))

This delivers the names corresponding to the N (=3) smallest values in CT range of Bradford - Data. It can be copied in order process the data from CU, CV, etc.

Adjust the 12 in the range specification to 740.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,742
Members
448,989
Latest member
mariah3

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