+ Reply to Thread
Results 1 to 15 of 15

If function 10 condition

  1. #1
    Registered User
    Join Date
    08-30-2008
    Location
    india
    Posts
    22

    If function 10 condition

    Hi,
    I need some code for the if function that have more than 7 condition. so,in the words
    1. IF GROUP1 ,TYPE1 ,point1<=10 ,point2>=5 Then E1="PASS"
    2. IF GROUP1 ,TYPE2 ,point1<=10 ,point2>=5 Then E1= "PASS"
    3. IF GROUP2 ,TYPE1 ,point1<=10 ,point2>=5 Then E1= "PASS"
    4. IF GROUP2 ,TYPE2 ,point1<=10 ,point2>=5 Then E1= "PASS"
    5. IF GROUP3 ,TYPE1 ,point1<=10 ,point2>=5 Then E1= "PASS"
    6. IF GROUP3 ,TYPE2 ,point1<=10 ,point2>=5 Then E1= "PASS"
    7. IF GROUP4 ,TYPE1 ,point1<=10 ,point2>=5 Then E1= "PASS"
    8. IF GROUP4 ,TYPE2 ,point1<=10 ,point2>=5 Then E1= "PASS"
    9. IF GROUP and TYPE and point1 and point2 ="" Then E1 =""
    10. IF point1 >10 ,point2<5 OF ALL OF GROUP1-4 ,ALLOF ALL TYPE1-4 , E= "FAIL" or if not in that condition from condition 1-9 Then E1="fail"
    by anyway i can do it.
    thank
    Attached Files Attached Files
    Last edited by VBA Noob; 11-02-2008 at 04:57 AM.

  2. #2
    Forum Contributor
    Join Date
    05-21-2004
    Location
    UK
    Posts
    136
    =IF(AND(point1<=10,point2>=5, OR(GROUP1,GROUP2,GROUP3,GROUP4),OR(TYPE1,TYPE2)),"PASS","FAIL")

  3. #3
    Forum Contributor
    Join Date
    05-21-2004
    Location
    UK
    Posts
    136
    re the book

    =IF(AND(C3<=10,D3>=5, OR(A3="GROUP1",A3="GROUP2",A3="GROUP3",A3="GROUP4"),OR(B3="TYPE1",B3="TYPE2")),"PASS","FAIL")

  4. #4
    Registered User
    Join Date
    08-30-2008
    Location
    india
    Posts
    22
    Thank,for your help
    i apply your code to my cell in e1
    e1=IF(AND(C3<=10,D3>=5, OR(A3),OR(B3)),"PASS","FAIL")
    but it be "#value" , can you tell me more how to do it
    thank
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-30-2008
    Location
    india
    Posts
    22
    Thank ,I test with the lastest code in cell e1.it work best ,but only one another condition .. if all of that cell are blank ,it still be "fail". can anyway to do it more , if all of it cell is blank ( no value), let it be blank not "fail"
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    05-21-2004
    Location
    UK
    Posts
    136
    Here you are

    =IF(COUNTIF(A3:D3,"")=4,"",IF(AND(C3<=10,D3>=5,OR(A3="GROUP1",A3="GROUP2",A3="GROUP3",A3="GROUP4"),OR(B3="TYPE1",B3="TYPE2")),"PASS","FAIL"))

  7. #7
    Registered User
    Join Date
    08-30-2008
    Location
    india
    Posts
    22
    Hi,thank
    your last code work well. i do it for my work.
    to day let me some question more for how to be the code as the nested if statement for my 10 condition which it difference to yesterday.
    for all 4 group and 2 type have a differce value.let you see the detail condition in the attach file,please.

    thank.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    05-21-2004
    Location
    UK
    Posts
    136
    Sorry, I am not clear on this one. Are you asking for a (slightly) different formula?

  9. #9
    Registered User
    Join Date
    08-30-2008
    Location
    india
    Posts
    22
    Hi, i need to solve with this ,with use of the nested if function.it is possible.
    IF CONDITION
    1. IF GROUP1 ,TYPE1 ,point1<=35 ,point2>=10 E1="PASS"
    2. IF GROUP1 ,TYPE2 ,point1<=45 ,point2>=15 E1= "PASS"
    3. IF GROUP2 ,TYPE1 ,point1<=60 ,point2>=20 E1= "PASS"
    4. IF GROUP2 ,TYPE2 ,point1<=70,point2>=35 E1= "PASS"
    5. IF GROUP3 ,TYPE1 ,point1<=80 ,point2>=40 E1= "PASS"
    6. IF GROUP3 ,TYPE2 ,point1<=85 ,point2>=50 E1= "PASS"
    7. IF GROUP4 ,TYPE1 ,point1<=90 ,point2>=55 E1= "PASS"
    8. IF GROUP4 ,TYPE2 ,point1<=100 ,point2>=60 E1= "PASS"
    9. IF GROUP ,TYPE ,point1 ,point2 ="" E =""
    10. IF point1 ,point2 OF ALL OF GROUP1-4 ,ALLOF ALL TYPE1-2 IS NOT IN CONDITION OF1-8 , E= "FAIL"

  10. #10
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    G'day Sam,

    I was clean out my excel forum folder and saw this xl spreadsheet and say " O yeah I was going to solve this one"

    Guess what I come up with a solution. I hope you like it.

    See attached.

    Cheers
    Attached Files Attached Files
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  11. #11
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    Hi all,

    It appears that I didn't test the formula too well.

    Please insert the correct formula in cell E1

    Please Login or Register  to view this content.
    Thanks and sorry for any headaches

    Cheers
    Last edited by ratcat; 11-01-2008 at 03:10 AM. Reason: Grammar and code font size

  12. #12
    Registered User
    Join Date
    08-30-2008
    Location
    india
    Posts
    22
    Hi,thanks so much ratcat
    your code is very well ,it work.
    but let me more some queution, for the other condition , if all of cell (group,type,point1,point2) are no value.can anyway for e1="" (blank) ,not it show n/a. how to apply the code.
    Best regards.

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    Please Login or Register  to view this content.

  14. #14
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111
    Quote Originally Posted by martindwilson View Post
    Please Login or Register  to view this content.
    G'day Sam,

    Yeah, what Martin said. I'm glad you like the solution. Thanks for the thanks.

    Cheers

    @ martindwilson: Thanks for speed up the solution. Now I've got extra time to go and play some guitar now

  15. #15
    Registered User
    Join Date
    08-30-2008
    Location
    india
    Posts
    22
    Hi, all
    thank so much for your help, see you next time.
    sam.k

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How does this code output the coefficients of a trendline?
    By gshock in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-13-2010, 05:54 PM
  2. Modify a Function to add an extra condition
    By King_Quake in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2008, 04:32 PM
  3. Custom Function w. 2 condition
    By japorms in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-23-2008, 03:31 PM
  4. rank function on condition
    By David Obeid in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-07-2008, 02:23 AM
  5. IF function condition
    By Tudor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-27-2007, 09:54 AM

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