VLookup smallest amount and fill in last column with text

LindaGibson

New Member
Joined
Jul 28, 2004
Messages
5
I have a spread sheet listing types of paper, (4) vendors and their price for such. I want the last column to show who has the lowest price.

columns are:

paper / weight / Vendor 1 price / Vendor 2 price / Vendor 3 price / Vendor 4 price / Best price

I want a formula that will lookup and compare all 4 vendor's prices (columns C, D, E & F) and have their name be inserted in column G (as follows)

Vendor1 = JC
Vendor2 = UNI
Vendor3 = SP
Vendor4 = XPX

how would I do that?

Thanks so much!
Linda
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi Linda, welcome to MrExcel!!

I think you'd probably get better results with an INDEX/MATCH combination. Here's an example...
Book6
CDEFG
1JCUNISPXPXBest Price
287133016UNI
36488351JC
448365627XPX
595734731XPX
624232427UNI
728633251JC
8574559JC
987204180UNI
109373156JC
1139165648UNI
1226926187JC
1371383012XPX
145651150JC
Sheet1


formula is:

=INDEX($C$1:F2,1,MATCH(MIN($C2:$F2),$C2:$F2,0))

copy down as needed. This does require that you have their names in row 1. If not, it will be more difficult, but can be worked around.


edit: btw, a formula for that might look like this...

=CHOOSE(MATCH(INDEX($C$1:F2,1,MATCH(MIN($C2:$F2),$C2:$F2,0)),$C$1:$F$1,0),"JC","UNI","SP","XPX")
 
Upvote 0
Re: VLookup smallest amount and fill in last column with tex

In G2:
=OFFSET($Z$1,MATCH(MIN($C2:$F2),$C2:$F2,-1),0)

With your company list starting at Z1 listed down.
 
Upvote 0
Re: VLookup smallest amount and fill in last column with tex

LindaGibson said:
I have a spread sheet listing types of paper, (4) vendors and their price for such. I want the last column to show who has the lowest price.

columns are:

paper / weight / Vendor 1 price / Vendor 2 price / Vendor 3 price / Vendor 4 price / Best price

I want a formula that will lookup and compare all 4 vendor's prices (columns C, D, E & F) and have their name be inserted in column G (as follows)

Vendor1 = JC
Vendor2 = UNI
Vendor3 = SP
Vendor4 = XPX

how would I do that?

Thanks so much!
Linda

Using the formula system I described in:

http://www.mrexcel.com/board2/viewtopic.php?t=72823&start=10
aaBestPriceVendors LindaGibson.xls
ABCDEFGHIJKLMNOP
1paperweightJCUNISPXPXRankBestPrice
2Letter803.993.492.894.02321401SP   
3A4703.12.53.922.5314211UNIXPX  
4A3901.811.812.912.64124311JCUNI  
5B5803.773.774.83.4234101XPX   
6
Vendors


G2, copied across to J2 then down:

=RANK(C2,$C2:$F2,1)+COUNTIF($C2:C2,C2)-1

K2:

=MAX(IF(INDEX(C2:F2,MATCH($L2,G2:J2,0))=C2:F2,G2:J2))-$L2

which must be confirmed with control+shift+enter instead of just with enter and then copied down.

Computes the number of ties of the best price.

L2: 1, the Top N paramater, which is copied down.

M2, which is copied across to P2 then down:

=IF(COLUMN()-COLUMN($M2)+1<=$L2+$K2,INDEX($C$1:$F$1,MATCH(COLUMN()-COLUMN($M2)+1,$G2:$J2,0)),"")
 
Upvote 0
Re: VLookup smallest amount and fill in last column with tex

Thank you soooooo much! I knew you guys would come through! :biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,516
Messages
6,119,980
Members
448,934
Latest member
audette89

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top