+ Reply to Thread
Results 1 to 8 of 8

STDEV IF function with multiple criteria

  1. #1
    Registered User
    Join Date
    04-02-2013
    Location
    Canada
    MS-Off Ver
    Excel 2011
    Posts
    14

    STDEV IF function with multiple criteria

    Hi everyone,

    I'm wondering if someone can help me with one of my formulas.

    I am looking to calculate the standard deviation for the values in column K2:K42, only if the values in column G2:G42 say "thin" AND if the values in column L2:L42 say "TRUE".

    I tried the below formula:

    =STDEV(IF($G$2:$G$42="thin",IF($L$2:$L$42="TRUE",$K$2:$K$42)))
    I followed this with Shift+Cntrl+Enter, and I keep coming up with #DIV/0! error.

    If anyone can help with this, that would be great! I've been working on this formula for a while now to no avail.

    Lauren

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: STDEV IF function with multiple criteria

    Hi

    Try

    =STDEV(IF((G2:G42="thin")*(L2:L42),K2:K42,""))

    Array entered...

    rylo

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: STDEV IF function with multiple criteria

    If the TRUE in column L is the Boolean TRUE just remove the quotes:

    =STDEV(IF($G$2:$G$42="thin",IF($L$2:$L$42=TRUE,$K$2:$K$42)))

    Still array entered.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    04-02-2013
    Location
    Canada
    MS-Off Ver
    Excel 2011
    Posts
    14

    Re: STDEV IF function with multiple criteria

    Thank you both! Both of these formulas worked and produced the same result

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: STDEV IF function with multiple criteria

    You're welcome. Thanks for the feedback!

  6. #6
    Registered User
    Join Date
    05-14-2012
    Location
    dublin
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: STDEV IF function with multiple criteria

    thanks it worked !

    I've used as test





    03/17/2014 10 Next Day
    03/18/2014 2 Other
    03/19/2014 3.5 Same Day
    03/17/2014 2 Same Day
    03/17/2014 5 Next Day
    03/17/2014 9 Next Day
    03/17/2014 5 Other

    E4 = 03/17/2014

    =STDEV(IF($B$3:$B$43=E4,IF(OR($D$3:$D$43="Next Day",$D$3:$D$43="Same Day",$D$3:$D$43="Other"),$C$3:$C$43))) =3.271085447


    To check if worked.

    10
    2
    5
    9
    5
    =STDEV(E10:E14) = 3.271085447

  7. #7
    Registered User
    Join Date
    02-11-2021
    Location
    Bhubaneswar
    MS-Off Ver
    Office 365
    Posts
    6

    Thumbs up Re: STDEV IF function with multiple criteria

    Hi

    This really helped me a lot to address my desired result. But now, I am stuck with blank rows in the table. In case of blank rows, this formula assumes it as
    January month and giving erroneous Std. Deviation for January month.

    Kindly help.

    Refer to attachment.
    Attached Files Attached Files

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: STDEV IF function with multiple criteria

    Quote Originally Posted by dineshpatra06 View Post
    Hi

    This really helped me a lot to address my desired result. But now, I am stuck with blank rows in the table. In case of blank rows, this formula assumes it as
    January month and giving erroneous Std. Deviation for January month.

    Kindly help.

    Refer to attachment.
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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