Returning column header as result

P

Patricia

I have a mileage table exported out of Map Point and into Excel. I have a
formula to return the minimum mileage but I also need to return the city in
the column next to the formula. I'd also like to find the next closest city.
Any help will be appreciated.

Min Formula - =MIN(AI2:CY2)

Columns look like:
Closest Min Dist Amusement Chicago Cincinnati Cleveland
Springfield
2 Field Museum 2 200
400 150
xx Six Flags, Gurney xx xxx
xxx xxx
xxx Six Flags, St. Louis xx xxx
xxx xxx
 
T

Toppers

Try:

=INDEX($AI$1:$CY$1,1,MATCH(MIN($AI2:$CY2),$AI2:$CY2,0))

You can substitute MIN($AI2:$CY2) with cell which contains this value

HTH
 
P

Patricia

Thanks, I had tried the index but had problems with the matching and min in
my formula.

Do you know how to get the next minimum number?
 
T

Toppers

You could use the SMALL function:

=SMALL(AI2:CY2,2) will give 2nd smallest number

=SMALL(AI2:CY2,1) will give smallest number (instead of MIN)

HTH
 
P

Patricia

Toppers,

Thank you so very much. This is exactly what I needed to not only bring a
summary of the two closest items but also what those items are!.

Patricia
 

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

Similar Threads


Top