Find Smallest and Next Smallest Value

Aniphilo

New Member
Joined
Oct 17, 2015
Messages
9
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
Joined
Mar 22, 2010
Messages
2,396
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




DEFGHIJK
1jane 6
2peter 3 0phil
3phil 0 3peter
4geoff 0 4mark
5tony 8 5yvonne
6mark 4 6jane
7yvonne 5 8tony
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>

Spreadsheet Formulas
CellFormula
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>
 

Forum statistics

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

Some videos you may like

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...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top