# Ranking prices at same facilities and identifying minimums

#### nirvehex

##### Active Member
Hi All,

I'm a bit stumped on how to setup a calculation in Excel.

In column A I have a list of Facility ID's and in column K I have prices. What I am trying to do is create a formula in column O that outputs "Minimum" if in column K it is the lowest price for the facility ID in column A. Example Table below. If there is a tie in price, I'd like to only identify one of them as "minimum."

 Facility ID Price Output FAC000001 51.96 Minimum (reason is only one price for this facility) FAC000002 1.0392 Minimum (reason is lowest price for this facility) FAC000002 4.33 FAC000004 .5196 Minimum (reason is lowest price for this facility - only put minimum on one line if there is a tie) FAC000004 .5196 FAC000004 2.165 FAC000005 4.33 FAC000010 .5196 Minimum (reason is lowest price for this facility)

Is there some sort of ranking/array function I can use?

Thanks!

-M

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

#### Fluff

##### MrExcel MVP, Moderator
What version of Excel are you using?

I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

#### nirvehex

##### Active Member
Thanks Fluff, Happy New Year to ya! I just updated my Excel version by doing what you suggested. I'm on Office 365 ProPlus.

#### Fluff

##### MrExcel MVP, Moderator
Excel Formula:
``=IF(AND(COUNTIFS(A\$2:A2,A2,K\$2:K2,K2)=1,MINIFS(K:K,A:A,A2)=K2),"Minimum","")``

#### nirvehex

##### Active Member
Brilliant! That worked. Thanks!!

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback.

Replies
8
Views
217
Replies
2
Views
305
Replies
3
Views
131
Replies
10
Views
1K
Replies
3
Views
323

1,148,334
Messages
5,746,154
Members
423,994
Latest member
blzxatly

### 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.

### Which adblocker are you using?

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

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