Weird behavior SMALL

iKoenvD

New Member
Joined
Nov 2, 2022
Messages
7
Office Version
  1. 2016
Platform
  1. MacOS
Hi,

I have a list of numbers and want to sort it while checking for criteria. My thought was to use
Excel Formula:
=SMALL(IF($A$2:$A$11>$C$1,$A$2:$A$11,99),COUNTA($B$1:B1)+1)
in cell B2 and extend it down. Without the IF function it works fine, but with it it acts real strange. It show a list that is in order, but the first number for example doesn't comply with criteria. Then the third and fourth cells show a #NUM! error. The real strange thing is when I select the formula and press F9 to preview the outcome, it show the right outcome.
Thoughts?
Schermafbeelding 2022-11-03 om 09.28.48.png
Schermafbeelding 2022-11-03 om 09.30.20.png
Schermafbeelding 2022-11-03 om 09.29.30.png
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Did you array enter it?
 
Upvote 0
Welcome to the MrExcel board!

Another option to consider that does not require array entry:

22 11 03.xlsm
ABC
15
2136
3188
4410
5213
6818
74520
8630
92045
1010 
1130 
Sort
Cell Formulas
RangeFormula
B2:B11B2=IFERROR(AGGREGATE(15,6,A$2:A$11/(A$2:A$11>=C$1),ROWS(B$2:B2)),"")
 
Upvote 0
Solution
Welcome to the MrExcel board!

Another option to consider that does not require array entry:

22 11 03.xlsm
ABC
15
2136
3188
4410
5213
6818
74520
8630
92045
1010 
1130 
Sort
Cell Formulas
RangeFormula
B2:B11B2=IFERROR(AGGREGATE(15,6,A$2:A$11/(A$2:A$11>=C$1),ROWS(B$2:B2)),"")
Thanks! I didn't realize it was an array entry, but the original dataset is quite large so I rather not use array. This works! Though I don't quite understand it yet.
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,819
Members
449,469
Latest member
Kingwi11y

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