# Using if formula to find best vendor price

#### Stevereyn29

##### New Member
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

#### jtakw

##### Well-known Member
Hi,

Something like this?

B9 formula copied to C12.

#### Stevereyn29

##### New Member
Is that considered a nested IF function though?

#### jtakw

##### Well-known Member
Is that considered a nested IF function though?
No, a nested IF is not the way to go for this.

If you MUST use a nested IF, that's a hint it's some kind of homework, then I can't help you.

#### Stevereyn29

##### New Member
It is homework, but I don't see how it's possible to use nested IF to do what we're supposed to do. I've never used excel in my life and all we were given for "instructions" was this useless video that doesn't pertain to our assignment. I just don't get it. https://www.youtube.com/watch?v=MtDGUHdS3VY

#### AhoyNC

##### Well-known Member
Perhaps this example will help, but not the most efficient way.
Excel Workbook
AB
1a5
2b6
3c4
4
5
6Min
7
 Sheet

#### Joe4

It is homework, but I don't see how it's possible to use nested IF to do what we're supposed to do. I've never used excel in my life
What kind of course is this? Is it an Excel class or some kind of business class?

#### jtakw

##### Well-known Member
AhoyNC has given you an example of what a nested IF formula may look like, I also suggest searching our forum for "Nested IF" and/or the WWW for more samples so that you can try and solve your query.

If you put together a formula, but can not get it work correctly, post back with what you have, then someone can help point you in the right direction to correct it.

Good Luck.

#### Stevereyn29

##### New Member
What kind of course is this? Is it an Excel class or some kind of business class?
Random business class. I don't know anything about Excel. Unfortunately these 2 IF formulas are 40% of the grade for this assignment.

What I was trying to write is =if(b2:b6=b8,"name of company in A column). I know that isn't an actual formula but do you see what I'm getting at? I am trying to make it say the name of the company from Column A who's B value matches the calculated min in B8.

#### jtakw

##### Well-known Member
Random business class. I don't know anything about Excel. Unfortunately these 2 IF formulas are 40% of the grade for this assignment.

What I was trying to write is =if(b2:b6=b8,"name of company in A column). I know that isn't an actual formula but do you see what I'm getting at? I am trying to make it say the name of the company from Column A who's B value matches the calculated min in B8.
I strongly suggest you study the formula AhoyNC posted above, figure out his logic based on his sample, and try to adapt it to your question.