Return smallest two numbers with negatives in Excel -


if have array of numbers in excel below:

-5    1    4    -2 

i need return -5 , -2 (each in separate cell).

the =small(array, 1) not work because numbers in array less 1. there workaround can traverse trough array , return 2 smallest numbers?

assuming numbers in range a2:a5 and

if want formula return output in rows, place formula in cell , copy down.

=small($a$2:$a$5,rows(a$1:a1)) 

if want formula return output across columns, place formula in cell , copy across or right.

=small($a$2:$a$5,columns($a1:a1)) 

change ranges required.


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -