+ Reply to Thread
Results 1 to 19 of 19

Formular for multiple conditions

  1. #1
    Forum Contributor
    Join Date
    02-11-2016
    Location
    tanzania
    MS-Off Ver
    2007
    Posts
    319

    Formular for multiple conditions

    Hi
    friends
    i need to have a formular which cut across COLUMNS
    for instance COLUMN A to C
    column A if marked F
    column B if marked 7 to 17 or 18 to 21
    the result in column C to be DIV III
    and AT THE SAME TIME in
    column A if marked A or B or C or D,
    column B if marked 7to 17
    the result in column c to be DIV I
    column B if marked 18to 21
    the result in column c to be DIV II
    column B if marked 22 to 25
    the result in column c to be DIV III
    column B if marked 26 to 33
    the result in column c to be DIV IV
    column B if marked 34 to 35
    the result in column c to be DIV O

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Formular for multiple conditions

    Nested IF

    =IF( AND( A2-"F", B2>=7, B2<=21) , "DIV III", IF( AND( OR(A2="A", A2="B", A2="C", A2="D"), B2>=7 B2<=17) , "DIV 1" , IF(......etc

    we can simplify with some array formulas for A -A,B,C or D

    but ,

    column B if marked 7 to 17 or 18 to 21
    does that mean the same as >=7 and <=21
    or can you have 17.5 and do not want to include fractions between 17 and 18 ?
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    02-11-2016
    Location
    tanzania
    MS-Off Ver
    2007
    Posts
    319

    Re: Formular for multiple conditions

    I do not include fractions between 17 and 18

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Formular for multiple conditions

    so
    column B if marked 7 to 17 or 18 to 21
    actually means
    B if marked 7 to 21

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formular for multiple conditions

    Give this a go

    =IFERROR(IF(AND(A2="F",B2=MEDIAN(B2,7,21)),"DIV III",IF(ISNUMBER(FIND(A2,"ABCD")),"DIV "&LOOKUP(B2,{7,18,22,26,34},{"I","II","III","IV","O"}),"")),"")

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Formular for multiple conditions

    Try

    Table below set up in H2:I6 in my formula

    Please Login or Register  to view this content.

    =IFERROR(IF(AND($A2="F",$B2<=21),"DIV III",VLOOKUP($B2,H2:I6,2,1)),"")

    Assumptions made:

    A cannot be "E" i.e. only A, B, C, D, F

    No value in B can be less than 7 ( no testing for lower value) : if not true, what result do you want?

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: Formular for multiple conditions

    =IF(AND(A2="F",B2>=7,B2<=21),"DIV III",IF(AND(OR(A2={"A","B","C","D"}),B2>=7,B2<=17),"DIV 1",IF(AND(OR(A2={"A","B","C","D"}),B2>=18,B2<=21),"DIV II",IF(AND(OR(A2={"A","B","C","D"}),B2>=22,B2<=25),"DIV III",IF(AND(OR(A2={"A","B","C","D"}),B2>=26,B2<=33),"DIV IV",IF(AND(OR(A2={"A","B","C","D"}),B2>=34,B2<=35),"DIV O","not in range"))))))

  8. #8
    Forum Contributor
    Join Date
    02-11-2016
    Location
    tanzania
    MS-Off Ver
    2007
    Posts
    319

    Re: Formular for multiple conditions

    All formular does not work i need more help
    Last edited by issa.o; 05-07-2016 at 09:43 AM.

  9. #9
    Forum Contributor
    Join Date
    02-11-2016
    Location
    tanzania
    MS-Off Ver
    2007
    Posts
    319

    Re: Formular for multiple conditions

    All formular gives div one but not what i want

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formular for multiple conditions

    Which formula did you try?

    Mine works fine for me so if you have problems with it then there may be some inconsistencies in your source data.

    A sample file would help us to see the problem.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Formular for multiple conditions

    ... error in mine that it did not have absolute references

    =IFERROR(IF(AND($A2="F",$B2<=21),"DIV III",VLOOKUP($B2,$H$2:$I$6,2,1)),"")


    However worked OK with my sample data .

  12. #12
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Formular for multiple conditions

    Quote Originally Posted by jason.b75 View Post
    Which formula did you try?

    Mine works fine for me so if you have problems with it then there may be some inconsistencies in your source data.

    A sample file would help us to see the problem.
    If A2=(A,B,C, or D) and B2 is greater than 35. Your formula returns DIV O ---- FAIL

  13. #13
    Forum Contributor
    Join Date
    02-11-2016
    Location
    tanzania
    MS-Off Ver
    2007
    Posts
    319

    Re: Formular for multiple conditions

    Yes of course but i want to have a penalt to get div III for those who score F in column A2 although they score bellow 21 WHERE THEY CAN SCORE DIV I OR II IF IN COLUMN A2 THEY GET A,B,C,D but for those who score F in A2 and in B2 score points from 22 to 35 they are not required to get penalt but to have they are origin divi which are III ,IV, 0

  14. #14
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formular for multiple conditions

    Quote Originally Posted by Teethless mama View Post
    If A2=(A,B,C, or D) and B2 is greater than 35. Your formula returns DIV O ---- FAIL
    Read post #1, the information provided indicates that 35 is the upper limit for values in column B, so anything greater would be an inconsistency in the source data.

    The only FAIL is in your ability to process the information in the thread correctly.

  15. #15
    Forum Contributor
    Join Date
    02-11-2016
    Location
    tanzania
    MS-Off Ver
    2007
    Posts
    319

    Re: Formular for multiple conditions

    Soo you mean the above formular it works?

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

    Re: Formular for multiple conditions

    Quote Originally Posted by jason.b75 View Post
    The only FAIL is in your ability to process the information in the thread correctly.
    Teethless mama is a well known troll on this site.

    That's what they do. I suggested that they be banned a long time ago.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  17. #17
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formular for multiple conditions

    All of them work with test data.

    There is little more we can do without a sample file from you to establish the differences.

  18. #18
    Forum Contributor
    Join Date
    02-11-2016
    Location
    tanzania
    MS-Off Ver
    2007
    Posts
    319

    Re: Formular for multiple conditions

    If you test the above formular and it works well
    sorry may you attach a file my be i was not able to write formular correct

  19. #19
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Formular for multiple conditions

    See attached with the 3 formulae.
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 01-14-2016, 03:53 PM
  2. Complicated formular. Formular, remove text if available
    By TheTrooper1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2014, 12:39 PM
  3. IF Formular with Average Formular
    By Ginger2k9 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-28-2014, 04:56 AM
  4. [SOLVED] Replacing a date formular result with another formular
    By stpeter in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-06-2013, 06:27 PM
  5. Posting Maltiple Payments to Multiple Invoices – FIFO Method
    By amardas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2013, 12:40 AM
  6. Replies: 1
    Last Post: 04-11-2012, 10:21 AM
  7. Need Help With A Formular
    By ximen in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-11-2005, 01:06 PM

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