Using if formula to find best vendor price

Stevereyn29

New Member
Joined
Mar 27, 2018
Messages
5
https://imgur.com/Dlb67mk

I have a spreadsheet with different companies and how much they charge for gas. I need to make an if formula that will put the company name with the cheapest of each gas type in the "Jet Fuel Vendor" and "AVgas Vendor". The exact wording of what I need to do is

Using nested “IF” functions, create a formula for the cell in Column B, Row 9 that places the name of the “winning” vendor for the “Best Jet Fuel Price.”

Using nested “IF” functions, create a formula for the cell in Column C. Row 12 that places the name of the “winning” vendor for the “Best Avgas Price.”

I figured out how to find the minimum of each row but I don't know how to make it pick the name of the cheapest one. I've been sitting here frusturated for an hour and half. It has to be an IF. Please help
 
Using that I've got it!
=IF(B2=$B$8,A2,IF(B3=$B$8,A3,IF(B4=$B$8,A4,IF(B5=$B$8,A5,IF(B6=$B$8,A6)))))
=IF(C2=$C$11,A2,IF(C3=$C$11,A3,IF(C4=$C$11,A4,IF(C5=$C$11,A5,IF(C6=$C$11,A6)))))

I didn't think that would work because I thought all the false written along with the 1 true would cause a value error. I must have been formatting wrong in my other attempts. I definitely didn't use the $ at all but it seems to have made the difference.
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Great job, very glad you got it to work, so now you know how to use Nested IF statements for other problems.:)
 
Upvote 0
Using that I've got it!
=IF(B2=$B$8,A2,IF(B3=$B$8,A3,IF(B4=$B$8,A4,IF(B5=$B$8,A5,IF(B6=$B$8,A6)))))
=IF(C2=$C$11,A2,IF(C3=$C$11,A3,IF(C4=$C$11,A4,IF(C5=$C$11,A5,IF(C6=$C$11,A6)))))

I didn't think that would work because I thought all the false written along with the 1 true would cause a value error. I must have been formatting wrong in my other attempts. I definitely didn't use the $ at all but it seems to have made the difference.
bro we must be taking the exact same class, I literally owe you a kiss on the mouth for this
 
Upvote 0

Forum statistics

Threads
1,215,753
Messages
6,126,677
Members
449,327
Latest member
John4520

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