# Find Smallest and Next Smallest Value

#### Aniphilo

##### New Member
Hi,

The problem I am having is that my two formulas are finding the same result

Formula 1
=INDEX(\$D5:\$D11,MATCH(SMALL(\$G5:\$G11,1),\$G5:\$G11,0))

Formula 2
=INDEX(\$D5:\$D11,MATCH(SMALL(\$G5:\$G11,2),\$G5:\$G11,0))

D5:D11 (staff names)
G5:G11 (number of files)

I am trying to find the staff member with the lowest and then next lowest number of files.

If there are multiple staff with zero files would that make both formulas give the same result?

It's like I need the 2nd formula to calculate the smallest value not equal to Formula 1.

Thank you

#### Dryver14

##### Well-known Member
I have managed to do this with 2 columns, Formulas in K2 and J3 are Control shift enter then copy down
formula in J1 is not

 D E F G H I J K 1 jane 6 2 peter 3 0 phil 3 phil 0 3 peter 4 geoff 0 4 mark 5 tony 8 5 yvonne 6 mark 4 6 jane 7 yvonne 5 8 tony 8

<colgroup><col style="width: 30px; font-weight: bold;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"><col style="width: 64px;"></colgroup><tbody>
</tbody>

 Cell Formula J2 =SMALL(\$G\$1:\$G\$7,1) K2 {=INDEX(\$D\$1:\$D\$7,MATCH(J2,\$G\$1:\$G\$7,0))} J3 {=SMALL(IF(\$G\$1:\$G\$7>J2,\$G\$1:\$G\$7),1)} K3 {=INDEX(\$D\$1:\$D\$7,MATCH(J3,\$G\$1:\$G\$7,0))} J4 {=SMALL(IF(\$G\$1:\$G\$7>J3,\$G\$1:\$G\$7),1)} K4 {=INDEX(\$D\$1:\$D\$7,MATCH(J4,\$G\$1:\$G\$7,0))} J5 {=SMALL(IF(\$G\$1:\$G\$7>J4,\$G\$1:\$G\$7),1)} K5 {=INDEX(\$D\$1:\$D\$7,MATCH(J5,\$G\$1:\$G\$7,0))} J6 {=SMALL(IF(\$G\$1:\$G\$7>J5,\$G\$1:\$G\$7),1)} K6 {=INDEX(\$D\$1:\$D\$7,MATCH(J6,\$G\$1:\$G\$7,0))} J7 {=SMALL(IF(\$G\$1:\$G\$7>J6,\$G\$1:\$G\$7),1)} K7 {=INDEX(\$D\$1:\$D\$7,MATCH(J7,\$G\$1:\$G\$7,0))}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>

1,082,167
Messages
5,363,528
Members
400,747
Latest member
monty_gl

### This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...