Nested Conditions

whippler

New Member
Joined
Dec 13, 2002
Messages
15
I have a dynamic table below, and I want the last column to display one of four things based on the third column:

geo a b
north 7.5 0.1 FALSE
south 9.4 0.4
west 7.0 0.3
central 6.9 -0.1
blank 5.8 -0.1
blank 8.1 -0.6
blank 7.6 0.8
BLANK
BLANK


1. "BLANK" (IF FIRST COLUMN SAYS "BLANK")

2. 1 (IF THIRD COLUMN VALUE IS >0.5)
3. 0 (IF THIRD COLUMN VALUE IS BETWEEN -0.5 AND -1)
4. -1 (IF THIRD COLUMN VALUE IS -1)

This is the formula I used, but getting "FALSE" as my output.

=IF(A2="BLANK","BLANK", IF(AND(C2<-0.5,C2>-1),0, IF(C2<-1,-1, IF(C2>0.5,1))))

Any thoughts?

Many thanks.
[/quote]
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
The false comes from the last if condition, since you didn't specify what to do when this is hit, it defaults to false. The first four data points do not meet any of your 4 conditions, so they fall to the last if and produce the false. The last 5 meet condition 1 and should produce blank as the answer.
 
Upvote 0
Seti is right,
Also what happens when values are between -0.5 - +0.5 ?

Eli
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,483
Members
448,967
Latest member
visheshkotha

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