SMALL FUNCTION - How it works

Q

Qull666

This is another question that requires layman explanation(for Small Function).
I just can't figure out how to operate the function.

I found the Small function in this Formula:

=IF(ISERROR(SMALL(Data!$F:$F,ROWS($A$1:A1))),"", INDEX(Data!A:A,
MATCH(SMALL(Data!$F:$F,ROWS($A$1:A1)),Data!$F:$F,0)))
-Max xl 97.-

---------------------------------------------------

--Extracted from the HELPER!--
SMALL
Returns the k-th smallest value in a data set. Use this function to return
values with a particular relative standing in a data set.

Syntax
SMALL(array,k)

Array is an array or range of numerical data for which you want to
determine the k-th smallest value.

K is the position (from the smallest) in the array or range of data to
return.

Remarks

If array is empty, SMALL returns the #NUM! error value.

If k ≤ 0 or if k exceeds the number of data points, SMALL returns the #NUM!
error value.

If n is the number of data points in array, SMALL(array,1) equals the
smallest value, and SMALL(array,n) equals the largest value.

Example

SMALL({3,4,5,2,3,4,5,6,4,7},4) equals 4
SMALL({1,4,8,3,7,12,54,8,23},2) equals 3

I am even more confused after this.

Thanks.
 
P

Pete_UK

Breaking this formula down, you have:

=IF(ISERROR(small_function),"",INDEX(small_function))

Basically, this means if the small function returns an error then
return a blank, otherwise apply the small function to an INDEX.

The small function itself, i.e.:

SMALL(Data!$F:$F,ROWS($A$1:A1))

uses ROWS($A$1:A1) which returns 1, 2, 3 etc when it is copied to
different rows, so it is just a convenient way to have the parameter
increment when the formula is copied down. It will find the smallest
value of the array Data!F on the first row, then the next smallest on
the second row, then the third smallest on the third row etc.

This part of the formula:

INDEX(Data!A:A,MATCH(SMALL(Data!$F:$F,ROWS($A$1:A1)),Data!$F:$F,0))

returns the corresponding value from column A of the smallest value in
column F for row 1, then the next smallest for row 2, then the third
smallest for row 3 etc.

Hope this helps.

Pete
 
B

Bob Phillips

ROWS($A$1:A1)

is almost as good as

ROW(A1)

copied down <G>

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

Breaking this formula down, you have:

=IF(ISERROR(small_function),"",INDEX(small_function))

Basically, this means if the small function returns an error then
return a blank, otherwise apply the small function to an INDEX.

The small function itself, i.e.:

SMALL(Data!$F:$F,ROWS($A$1:A1))

uses ROWS($A$1:A1) which returns 1, 2, 3 etc when it is copied to
different rows, so it is just a convenient way to have the parameter
increment when the formula is copied down. It will find the smallest
value of the array Data!F on the first row, then the next smallest on
the second row, then the third smallest on the third row etc.

This part of the formula:

INDEX(Data!A:A,MATCH(SMALL(Data!$F:$F,ROWS($A$1:A1)),Data!$F:$F,0))

returns the corresponding value from column A of the smallest value in
column F for row 1, then the next smallest for row 2, then the third
smallest for row 3 etc.

Hope this helps.

Pete
 
Q

Qull666

Dear Pete & Bob,

Thanks for the replies. I really need to think out of the parameter.

This formula list down row by row without repeating. (Something I have
always wanted to do with the IndexMatch function) but I just can't draw a
logic of how the differentiation work.

This is the thing!!!

In Current Sheet!:
Cell A2 (row 1) (small,row function) = Row 14-result from Data Sheet
Cell A3 (row 2) = Row 15-result from Data Sheet

* But this is Row 1 & 2, how does it know its row 14 & 15 that is marked by
a "Y".

--------------------------------------------------------------

In Data Sheet!:
If "Y" in any of column F, it will transfer info. to the Current Sheet!.

cell F14 Y (if "Y" then = Row 14)
cell F15 Y (if "Y" then = Row 15)
 
Q

Qull666

I FOUND OUT THE LOGIC.....THANK YOU!!!! THANK YOU!!!!!!!

Thanks Pete.

Bob, didn't have a chance to say thank you for the earlier stuff. It worked
very well. THANK YOU.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top