+ Reply to Thread
Results 1 to 8 of 8

Nested IF formula

Hybrid View

  1. #1
    Registered User
    Join Date
    11-08-2010
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    32

    Nested IF formula

    Dear All,

    I used following formula both as normal & array -

    =IF(AND($L$2:$L$98=0,$M$2:$M$98=0),STDEV(B2:B98),"-")

    The normal formula is returning #VALUE while array one is returning " - ".

    Please help where my problem lies.

    Regards,

    Dastgir

  2. #2
    Forum Contributor
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: Nested IF formula

    Try this one:

    =IF(AND(SUM($L$2:$L$98)=0,SUM($M$2:$M$98)=0),STDEV(B2:B98),"-")

    Enter that as a normal formula, not an array.

    Don't forget to click the little star to the left of this post if you feel I helped!
    Taming the Excel dragon... www.TheExcelphile.com

  3. #3
    Registered User
    Join Date
    11-08-2010
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Nested IF formula

    The Excelphile,

    Cell range $L$2:$L$98 & $M$2:$M$98 is not intended to be sumed here. The condition is that if any cell value is zero in this range, then STDEV of defined range.

    Dastgir

  4. #4
    Forum Contributor
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: Nested IF formula

    Hi Dastgir,

    I assumed that your formula meant if all cell values are zero in L2:L98 and M2:M98.

    According to your clarification, your formula should be:

    =IF(OR(MIN($L$2:$L$98)=0,MIN($M$2:$M$98)=0),STDEV(B2:B98),"-")

    Don't forget to click the little star to the left of this post if you feel I helped!

  5. #5
    Registered User
    Join Date
    11-08-2010
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Nested IF formula

    Quote Originally Posted by TheExcelphile View Post
    Hi Dastgir,

    I assumed that your formula meant if all cell values are zero in L2:L98 and M2:M98.

    According to your clarification, your formula should be:

    =IF(OR(MIN($L$2:$L$98)=0,MIN($M$2:$M$98)=0),STDEV(B2:B98),"-")

    Don't forget to click the little star to the left of this post if you feel I helped!
    Dear Excelphile,

    Why AND or any other logic is not applicable for a cell range, while it works fine with single cell condition.

    Dastgir

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Nested IF formula

    I am not aware the usage of STDEV function, but in general term the formula should be constructed like the below

    Array Formula - Requires Ctrl+Shift+Enter
    Formula: copy to clipboard
    =STDEV(IF(($L$2:$L$98=0)*($M$2:$M$98=0),(B2:B98)))


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  7. #7
    Registered User
    Join Date
    11-08-2010
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    32

    Re: Nested IF formula

    Quote Originally Posted by :) Sixthsense :) View Post
    I am not aware the usage of STDEV function, but in general term the formula should be constructed like the below

    Array Formula - Requires Ctrl+Shift+Enter
    Formula: copy to clipboard
    =STDEV(IF(($L$2:$L$98=0)*($M$2:$M$98=0),(B2:B98)))
    s,

    Dear Sixthsense,

    As we use * for AND use, is there any symbol which can be used for other logics such as OR , NOT etc.

    Regard

    Dastgir

  8. #8
    Forum Contributor
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: Nested IF formula

    Hi Dastgir,

    I guess that's just the way Excel is built. It has the potential to create confusion, just like it did when I misunderstood what you wanted.

    I can't say for sure, but this is just my guess.

    Regards,
    The Excelphile

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1