help, i want more than one IF statement

S

slickgemnem

Here is my problem, i have four columns and each has an amount in i
under headings rate a, rate b, rate c, and rate d. in the fifth colum
i want to display the cheapest in the form of that particular colum
heading.

Rate A cost Rate B cost Rate C Cost Rate D cost Cheapest
£24.70 £31.55 £29.49 £36.30 ????


why can i not have two if statements :

=IF(B8>C8,"Rate A","Rate B",IF(D8>E8,"rate c","rate D"))


help!
 
D

Dan E

Slickgemnem,

One way to accomplish your goal

=CHOOSE(MATCH(MIN(B2:E2),B2:E2,0),"Rate A","Rate B","Rate C","Rate D")

MATCH(MIN(B2:E2),B2:E2,0) will return the index number of the lowest value
The CHOOSE statement will pick the result based on the MATCH

Dan E
 
D

Dan E

You are nesting your IF statements incorrectly, The nesting must
happen in one of the results ie:

=IF(B8>C8,"Rate A",IF(D8>E8,"rate c","rate D"))
OR
=IF(B8>C8,IF(D8>E8,"rate c","rate D"),"Rate B")

Dan E
 

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

Top