View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] steve@stevefitzgerald.net is offline
external usenet poster
 
Posts: 4
Default Nested IF Statements

Hi,

I'm looking to return a result of blank, 1, or -1, depending on the
value of another cell. Here's what I have so far:

=IF((ISBLANK(A1),"",(IF((AND(ISNUMBER(A1),(IF(A1S QRT(AVERAGE(A$1:A
$54))),1,-1)))

What I want to do is:
- If the cell A is blank, cell B should be blank
- If cell A is a number then I want to check to see if the cell is
greater than the square root of the average of column A.
- If cell A is greater than the square root of the averages of column
A than cell B should be 1.
- If cell B is less than the square root of the average of column A
than cell B should be -1.

What I originally was using was:
=IF((AND(ISBLANK(A1))),"",(IF((A1SQRT(AVERAGE(A$1 :A$54))),1,-1)))

The problem I ran into was that if cell A1 and A2 were both zero than
column b would result as -1 since it was false.

What am I missing?