Problem with Function

S

sgreene

=If(N6>=4.6,â€Assertive",IF(N6<=4,"Not
Assertive",if(AND(N6>4.1,N6<=4.5,"Somewhat Assertive"))))


In this example what I want it to do is if
1. the number that appears is greater than 4.6 it should put in Assertive
2. the number that appears is equal to or less than 4.0 should put in Not
Assertive
3. the number that appears is greater than or equal to 4.1 and less than or
equal to 4.5 should put in Somewhat assertive
Please tell me what I am doing wrong!!
Thank you.
 
P

Per Jessen

Hi

You don't need the last IF.

=IF(N6>=4.6,"Assertive",IF(N6<=4,"Not Assertive","Somewhat Assertive"))

Regards,
Per
 
S

sgreene

Thank you for responding so quickly, but I need 3 functions because Somewhat
goes from 4.1 to 4.5 and Not assertive is equal to or less than 4.0...or am I
all wet?
thanks
 
D

Dave

Hi,
Just in case you're interested about the reason your original formula didn't
work:
The AND part of the formula has lost its closing bracket, and the end of the
formula has one too many.
It should look like this:

=If(N6>=4.6,â€Assertive",IF(N6<=4,"Not
Assertive",if(AND(N6>4.1,N6<=4.5),"Somewhat Assertive")))

Regards - Dave.
 
S

sgreene

Hi Dave thanks for responding...I copied and pasted your formula, but it
doesn't work...I keep getting an error. Any other suggestions?
Thanks again.
 
P

Per Jessen

Hi

If the value isn't >= 4.6 and the value isn't <= 4, the value has to be > 4
and < 4.6.

Regards,
Per
 
S

sgreene

This didn't work...I have 3 sections...Assertive, Not Assertive and Somewhat
Assertive
When I put your formula in the only thing that shows in the cell is the
formula
Thanks again.
 
D

Dave

Hi,

I've tried the following formula, and it works on my XL2000.

=IF(N6>=4.6,"Assertive",IF(N6<=4,"Not
Assertive",IF(AND(N6>4,N6<=4.5),"Somewhat Assertive")))

If you copy and paste, it comes with an invisible "endline" character inside
the formula, kindly inserted by this newsgroup window, which messes up
formula.
Try typing it in by hand.
By the way, I had to change the 4.1 value in the AND statement, to 4
Otherwise any value between 4.01 and 4.1 would return a "False".

Regards - Dave.
 
D

Dave

Hi,
The <=4.5 inside the AND statement also needs to be changed to <4.6
Otherwise values between 4.5 and 4.59 will return "FALSE"
Sorry, should've noticed that the first time.
Dave.
 
D

David Biddulph

But, as has already been pointed out by Per Jessen, you don't need to test
for <4.6 because you've previously tested for >=4.6.
(... just as you don't need to test for >4, because you had previously
tested for <=4).

Instead of
=IF(N6>=4.6,"Assertive",IF(N6<=4,"Not
Assertive",IF(AND(N6>4,N6<4.6),"Somewhat Assertive")))
you merely need
=IF(N6>=4.6,"Assertive",IF(N6<=4,"Not Assertive","Somewhat Assertive"))
 
D

Dave

Hi,
I know, but sometimes it's nice to know if your own formula could have
worked, even if it isn't the most streamlined way to achieve the purpose.
Dave.
 

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