View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Nested IF Statements

You said:

- 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.


In the sample you site, the sqrt and avg are equal which falls outside the
above description.

So, what should the result be?

--
Biff
Microsoft Excel MVP


wrote in message
...
Thanks. I used the formula as listed below. If I cell A1 is 0, A2 is 0
the cell B3 (I copy the formula down) lists as -1.

On Jan 3, 11:14 pm, "T. Valko" wrote:
In your explanation you don't mention that you're wanting the sqrt of A1
to
meet certain conditions but in your formula you're testing the sqrt of A1.

Assuming this formula can be interpreted to be your true intentions:

=IF((ISBLANK(A1),"",(IF((AND(ISNUMBER(A1),(IF(SQR T(A1)SQRT(AVERAGE(A$1:A$54))),1,-1)))


Try it like this:

=IF(A1="","",IF(COUNT(A1),IF(SQRT(A1)SQRT(AVERAGE (A$1:A$54)),1,-1),""))

--
Biff
Microsoft Excel MVP

wrote in message

...

Sorry, should be


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