# Find the lowest number?

E

#### evoxfan

I have many columns of different vendors with numbers that sum to a
particular row.
Row/Column: A B C D
1 Vendor1 Vendor2 Vendor3
2 1000 2000 1500
3 500 2000 2000
Totals 1500 4000 3500

"Name of lowest Vendor" "Amount of lowest Vendor"

I want to find the lowest number and display it in a cell and display the
name of the vendor in adjacent cell. What is best way to accomplish this?

E

#### evoxfan

I used the MIN formula but it does not ignore zeros. Will an if statement
ignore zeros to find the minimum number in the last row. I think I could use
a VLOOKUP after the minimum number is found.

D

#### Derrick

try something like this:

=IF(SUM(B22)=0,0, SMALL((B22),COUNTIF(B22,0)+1))

the if statement checks to see if everything is 0, and will output 0 if true
Small( looks up the range, rank of number) - so the range is B22, and then
the countif() will set a starting point for it to find the lowest number.
so:
0,0,1,2,3
will ouptut 1, because countif() +1 will return 3. so it will look for the
3rd smallest number. which essentially gets rid of 0's

D

#### Derrick

for looking up the vendors, just use LOOKUP. i find that V or HLOOKUP doesnt
really make anything simpler.

Lookup(Value, Array, Return Array)
so.. if Amount of lowest vendor is in B4,
B4=IF(SUM(B22)=0,0, SMALL((B22),COUNTIF(B22,0)+1))
and Lowest vendor name is in B5
B5=Lookup(B4, B22, B11) should work

The question now is: what happens if a vendor sells nothing?