What is wrong with this nested function?

A

A little stuck

I have entered the following nested function, but it says the formula
contains an error.

=IF(SUM(E55:E67)>=3, "Red"), (SUM(D55:D67)>=2, "Amber"), "Green"

Basically, I want the word, "Pink" to appear if SUM(E55:E67)>=3; the word,
"Yellow" to appear if SUM(D55:D67)>=2; and the word "Blue" to appear
otherwise.

Anyone know how I can do this? Any help would be much appreciated.
 
M

Max

Basically, I want the word, "Pink" to appear if SUM(E55:E67)>=3; the word,
"Yellow" to appear if SUM(D55:D67)>=2; and the word "Blue" to appear
otherwise.

On the face of it, try this:
=IF(SUM(E55:E67)>=3,"Pink",IF(SUM(D55:D67)>=2,"Yellow","Blue"))

The IF evaluates from left to right. Since you are testing 2 different
ranges, the sequence of the test becomes important. If the 1st IF test is
TRUE, you'd get "Pink" irrespective of the result from the 2nd IF test (which
will never get evaluated).
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
 
A

A little stuck

Perfect!! Thank you.

Max said:
On the face of it, try this:
=IF(SUM(E55:E67)>=3,"Pink",IF(SUM(D55:D67)>=2,"Yellow","Blue"))

The IF evaluates from left to right. Since you are testing 2 different
ranges, the sequence of the test becomes important. If the 1st IF test is
TRUE, you'd get "Pink" irrespective of the result from the 2nd IF test (which
will never get evaluated).
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
 
L

Lars-Åke Aspelin

On Tue, 14 Jul 2009 17:18:01 -0700, A little stuck <A little
I have entered the following nested function, but it says the formula
contains an error.

=IF(SUM(E55:E67)>=3, "Red"), (SUM(D55:D67)>=2, "Amber"), "Green"

Basically, I want the word, "Pink" to appear if SUM(E55:E67)>=3; the word,
"Yellow" to appear if SUM(D55:D67)>=2; and the word "Blue" to appear
otherwise.

Anyone know how I can do this? Any help would be much appreciated.

Try the following formula that is syntactically correct:

=IF(SUM(E55:E67)>=3, "Red", IF(SUM(D55:D67)>=2, "Amber", "Green"))

However you may have to check the spelling of the colors (Pink, Yellow
and Blue).

Hope this helps / Lars-Åke
 

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