+ Reply to Thread
Results 1 to 31 of 31

Nested testing

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Nested testing

    Sir
    greetings for the day!

    Currntly i am using formula

    Please Login or Register  to view this content.
    but i am not getting the desired result

    what i want from this nested testing

    if my cell h12 is "check this entry" or cell k12=102 or k12=103 or k12=112 or k12="*" then value of the cell in which i have feeded this formula should be "check this entry" and if h12 is "ok" but either of cells k12 should not =102 or k12 should not=103 or k12 should not=112 or k12 should not="*" then the value of the formula cell should be "ok"

    and if h12 is "ok" but either of cells k12 =102 or k12 =103 or k12 =112 or k12 ="*" then the value of the formula cell should be "check this entry"

    one more thing sir

    it all should be execeuted only when value(d12)>0 other wise formula cell should return as blank if value(d12) is not greater than zero

    plz help me sir

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Nested testing

    Hi zumbalj,

    Nice line
    Is that query directed to you ?

    Roshan, can you upload a sample workbook along with your expected results ? thanks.


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    Sir

    my sample sheet have so much of confidential data ,so it will be diff for me to upload orignal..but if u try it sir...it can be tested by creating cell h, k, d with dummy data

    plz help

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Nested testing

    Hi Roshan,

    I would be happy to help if you upload a sample workbook with dummy data showing your expected results clearly. Thanks.


    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Nested testing

    without sample workbook just with luck .

    =IF(D1>0,IF(AND(H1="ok",COUNTIF(M3:M7,K1)=0),"ok",IF((COUNTIF(M3:M7,K1)+COUNTIF(M3:M7,H1))>0,"Check this entry","")),"")

    M3 to M7 contains:
    Check this entry
    102
    103
    112
    *
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  6. #6
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Nested testing

    Self- Deleted...I got lost in the logic there
    Last edited by dredwolf; 06-18-2013 at 03:16 AM.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  7. #7
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    Sir

    my cell k12 will have either 101,103,112,* and h12 can be either "ok" or "check this entry"

    but my ultimate ans cell is g12 which check if k12 is none of the above and h12 is not "check this entry"

    then g12 ok

    other wise if either of condition is ther g12 "check this entry"

    but all should be exicuted only when d12>0

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Nested testing

    did you tried my formula change the cell referrence accordingly since I used H1,K1,H1

    Edit:

    =IF(D12>0,IF(AND(H12="ok",COUNTIF(M3:M7,K12)=0),"ok",IF((COUNTIF(M3:M7,K12)+COUNTIF(M3:M7,H12))>0,"Check this entry","")),"")

    dont forget to put the values in Column M3 to M7
    Last edited by vlady; 06-18-2013 at 04:55 AM.

  9. #9
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    Sir

    m3:m7

    does not have any value in my sheet

  10. #10
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    My nested testing should executed when d12>0 plus it should depend on two cells value that is h12 and k12

    plz help in this manner sir

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Nested testing

    Quote Originally Posted by dilipandey View Post
    Hi Roshan,

    I would be happy to help if you upload a sample workbook with dummy data showing your expected results clearly. Thanks.


    Regards,
    DILIPandey
    <click on below * if this helps>
    I am sure that if you do what Dilip suggested you'll find your solution in 10 minutes! Or else this thread will continue for many many posts...
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  12. #12
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    Sir

    sample for understanding the cases is attached with diff cases,plz see

    formula compatible with 2003 2007 excel both plz

    i will strech/drag the formula in column g
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    One thing i left to include in my sample is cell value in correponding column d must be greater than zero for the said results in sample ,other wise result column g should remain blank

  14. #14
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    Plz see attchment
    Attached Files Attached Files

  15. #15
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Nested testing

    Let's try this..

    =IF(D3="","",IF(AND(OR(H3="CHECK THIS ENTRY"),OR(K3="*",K3={102,103,112,"ANY THING"})),"CHECK THIS ENTRY","OK"))

  16. #16
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    Every thing is ok with this but one prob

    ok should come only when all the h and g column conditions are follwed and nothing is there that means

    h3 is not="check this entry",k3 is not="*",k3 is not={102,103,112, any thing

    and h3 is ok

    then only g3 should be ok

  17. #17
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    I mean for g3 "ok will only result when none of the testing comes true and h3 is "ok"

    then only g3 should come as "ok"

  18. #18
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Nested testing

    Try this version...

    =IF(D3="","",IF(OR(K3="*",K3={102,103,112,"ANY THING"}),"CHECK THIS ENTRY","OK"))

  19. #19
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    Earlier one was better than this,only one prob was with it,that if h3 is ok and else conditions are not true then g3 should be "ok"

  20. #20
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Nested testing

    =if(d3="","",if(and(or(h3="check this entry"),or(k3="*",k3={102,103,112,"any thing"})),"check this entry",if(and(or(h3="ok"),or(k3="*",k3={102,103,112,"any thing"})),"check this entry","ok")))

  21. #21
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    if(and(or(h3="ok"),or(k3="*",k3={102,103,112,"any thing"})),"
    IN THIS PART (k3 SHOULD NOT="*",k3 SHOULD NOT={102,103,112,"any thing"})),"
    THEN H3 SHOULD BE "OK"

  22. #22
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Nested testing

    I give up. No sense for me anymore.

    Good luck.

  23. #23
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    Anybody....

    I am confused how to use nested testing for should not equal to check as above are hampering...

  24. #24
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Nested testing

    Maybe..

    =IF(D3="","",IF(AND(OR(H3="check this entry"),OR(K3="*",K3={102,103,112,"any thing"})),"check this entry","ok"))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  25. #25
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    This is absolutely ok except one condition is left

    what i want is "ok" should come in result column only when h3="ok" and k3 not=102 nor 103 nor 112 nor 112 nor *

    that means ok should also be conditional and should come when above conditions got satisfied

  26. #26
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Nested testing

    i suggest you re-upload the file, put in the formulas they suggested, & highlight those that are turning out wrongly. i suppose column G is the column where your desired results are. keep that intact to compare. my try here is:
    =IF(D3<=0,"",IF(AND(K3<>{102,103,112,"*"},H3<>"CHECK THIS ENTRY"),"OK","CHECK THIS ENTRY"))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  27. #27
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    I have uploaded the same...plz see
    Attached Files Attached Files

  28. #28
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Nested testing

    try this in G3:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    (note ther curly braces ({ & })in red)
    Copy down

    In the attachment I put the solution in Column F (Highlighted) for comparison

    (Note 2- this is basically the same idea as the other solutions offered)

    Hope this helps
    Attached Files Attached Files

  29. #29
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Nested testing

    No problem sir....you all have taken my post ,and attempted and helped me..

    Thanks to all of you

    i think there would be no solution on "not equal to situations"

    so i will think for another alternative and now i am closing this post but anyways many many thanks to all of you....

    Excel forum has always helped me...

  30. #30
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Nested testing

    Even with "not equal too" situations, there are solutions...use the suggestions given and change the comparison operators... you can do whatever comparison you need, you just need to define the solution precisely, so you know what you are looking for as an answer, otherwise, we are operating on guesswork

    Edit-
    If you notice, almost all the solutions used 1 or more "not equal too" ("<>") operations for your answers...
    Last edited by dredwolf; 06-20-2013 at 03:31 AM.

  31. #31
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Nested testing

    If you uploadea sample with ONE of the formulas suggested, with explanations of why the results are NOT what you want, then we ALL could better help you... we are not without skills here, but if we can not see the problem YOU are having with OUR solutions, it is really hard to offer solutions

+ 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