+ Reply to Thread
Results 1 to 19 of 19

If statement or Alternative

  1. #1
    Registered User
    Join Date
    04-21-2018
    Location
    Leeds
    MS-Off Ver
    365
    Posts
    24

    If statement or Alternative

    Good Morning,

    Hope all is well with everyone. I am stuck and going round in circles using if statements and hope you can help me. i was wondering if they is another alternative? Or a completely different approach?

    I have a grading table that has some numbers in, this is based on criteria in columns H and I,

    Basically i would be putting in scores in row 9 through columns B/C/D/E/F

    A11 is a cell that i would like to automatically populate showing Excellent / Good / Fair / Needs Improvement / Unsatisfactory / Fail based on what scores i put in.

    If each column if blank = Blank
    If the score in each column is zero the cell populates "Excellent"
    Business Critical Column (B9) is 1 or more than 1 the cell in All populates "Fail"
    Critical Column (C9) is 1-3 = "Unsatisfactory"
    Critical Column (C9) is 4 or more than 4 = "Fail"
    Major Column (D9) is 1-3 = "Needs Improvement"
    Major Column (D9) is 4 or more than 4 = "Unsatisfactory"
    Minor Column (E9) is 1 or more than 1 = "Fair"
    Observation Column (F9) is 1 or more than 1 = "Good"

    I hope this makes sense. Please find attached a spreadsheet. Thank you for taking your time and effort into looking into this. It is appreciated.
    Attached Files Attached Files

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

    Re: If statement or Alternative

    IGNORE - got it wrong - as i saw fail and fare the same
    EDIT coming

    what order of importance is placed on the numbers
    for example
    would you have in C9 a 4 or more = "Fail"
    but in D9 4 or more = "Unsatisfactory"
    and F9 =1 then "Good"
    which cells take preference
    NOTE
    IF will work left to right
    and so if a condition is met - the rest are ignored

    i have worked out the Logic for each of those conditions
    so you could put in the order you want - LEFT will happen first

    fail OR( B9>=1 , c9>=4 )
    Unsatisfactory OR(AND(C9>=1,C9<=3),D9>=4)
    Needs Improvement AND(D9>=1,D9<=3)
    Fair E9>1
    good F9>=1
    Excellent Sum(B9:F9)=0
    BLANK AND(B9="",C9="",D9="",E9="",F9="")

    and in excell
    Attached Files Attached Files
    Last edited by etaf; 03-20-2024 at 08:15 AM.
    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
    Registered User
    Join Date
    04-21-2018
    Location
    Leeds
    MS-Off Ver
    365
    Posts
    24

    Re: If statement or Alternative

    Hi etaf,

    The order of the numbers is not important, i would be inputting the scores in B9 to F9, these will range from 0 to whatever.
    Once the scores have been inputted i just want cell A11 to populate what grading it is based on the criteria from columns H an I
    The numbers in the table is a reflection to the criteria in Columns H and I, basically a helper column.
    Ultimately i just want A11 to populate the correct grading based on whatever numbers are inputted in B9 to F9.
    Does this make sense?

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

    Re: If statement or Alternative

    ok
    EDIT I got it wrong sorry - saw fail and fare as the same
    EDIT coming


    fail OR( B9>=1 , c9>=4)
    Unsatisfactory OR(AND(C9>=1,C9<=3),D9>=4)
    Needs Improvement AND(D9>=1,D9<=3)
    Fair E9>=1
    good F9>=1
    Excellent Sum(B9:F9)=0
    BLANK AND(B9="",C9="",D9="",E9="",F9="")

    ==IF(AND(B9="",C9="",D9="",E9="",F9=""),"",IF(SUM(B9:F9)=0,"Excellent",IF(F9>=1,"good",IF(E9>=1,"Fair",IF(AND(D9>=1,D9<=3),"Needs Improvement",IF(OR(AND(C9>=1,C9<=3),D9>=4),"Unsatisfactory",IF(OR(B9>=1,C9>=4),"Fail","criteria not correct entered")))))))

    The order is left to right - so if there is a 1 or more in F9 it will ignore the other conditions
    hence the question
    would you have in C9 a 4 or more = "Fail"
    but in D9 4 or more = "Unsatisfactory"
    and F9 =1 then "Good"
    in the IF above F9 is tested first and so the result will be "good"
    D9 and C9 will be ignored as condition already met
    hence why i mentioned the order of the IF
    Attached Files Attached Files
    Last edited by etaf; 03-20-2024 at 08:24 AM.

  5. #5
    Registered User
    Join Date
    04-21-2018
    Location
    Leeds
    MS-Off Ver
    365
    Posts
    24

    Re: If statement or Alternative

    Hi etaf,

    Thank you, what you have done works if you just input in 1 cell only

    If i input a score of 1 in each cell in B9 to F9 it populates "good" when in reality it should populate "Fail" (based on the criteria)

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,833

    Re: If statement or Alternative

    yes, that was sort of what i was getting at the order matters

    FAIL is
    fail OR( B9>=1 , c9>=4)

    =IF(AND(B9="",C9="",D9="",E9="",F9=""),"",IF(SUM(B9:F9)=0,"Excellent",IF(F9>=1,"good",IF(E9>=1,"Fair",IF(AND(D9>=1,D9<=3),"Needs Improvement",IF(OR(AND(C9>=1,C9<=3),D9>=4),"Unsatisfactory",IF(OR(B9>=1,C9>=4),"Fail","criteria not correct entered")))))))

    which condition takes precedent
    if more that 1 can appy
    as you say
    FAIL
    because B9 is 1

    or do we have to consider various groupings or conditions

    E9 = 1
    and also
    C9 =1
    what would the result be
    Unsatisfactory or fair

    or do we have to say Fair is E9>=1 - providing ALL the other cells are blank or 0

    =AND( B9<1, C9<1,D9<1, F9<1 , E9>=1) - type of thing

  7. #7
    Registered User
    Join Date
    04-21-2018
    Location
    Leeds
    MS-Off Ver
    365
    Posts
    24

    Re: If statement or Alternative

    Hi etaf,

    Once all cells B9 to F9 have been inputted.

    1. Fail
    2. Unsatisfactory
    3. Needs Improvement
    4. Fair
    5. Good
    6. Excellent

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

    Re: If statement or Alternative

    SO rearranging to that order


    =IF(AND(B9="",C9="",D9="",E9="",F9=""),"",
    IF(OR(B9>=1,C9>=4),"Fail",
    IF(OR(AND(C9>=1,C9<=3),D9>=4),"Unsatisfactory",
    IF(AND(D9>=1,D9<=3),"Needs Improvement",
    IF(E9>=1,"Fair",
    IF(F9>=1,"good",
    IF(SUM(B9:F9)=0,"Excellent",
    "criteria not correct entered")))))))

    so now thats the order you gave 1-6
    1. Fail
    2. Unsatisfactory
    3. Needs Improvement
    4. Fair
    5. Good
    6. Excellent
    Once all cells B9 to F9 have been inputted.
    BUT it will do it as you enter - its not waiting for each cell to be complete - which would probably need VBA to do that

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,131

    Re: If statement or Alternative

    Maybe it can be tweaked so as not to need VBA:

    =IF(AND(B9="",C9="",D9="",E9="",F9=""),"",
    IF(OR(B9="",C9=""),"",
    IF(OR(B9>=1,C9>=4),"Fail",
    IF(OR(AND(C9>=1,C9<=3),D9>=4),"Unsatisfactory",
    IF(AND(D9>=1,D9<=3),"Needs Improvement",
    IF(E9>=1,"Fair",
    IF(F9>=1,"good",
    IF(SUM(B9:F9)=0,"Excellent",
    "criteria not correct entered"))))))))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  10. #10
    Registered User
    Join Date
    04-21-2018
    Location
    Leeds
    MS-Off Ver
    365
    Posts
    24

    Re: If statement or Alternative

    Hi etaf,

    Brilliant, it works.

    I have changed it a little bit similar to AliGW help below.

    =IF(AND(B9="",C9="",D9="",E9="",F9=""),"",
    IF(OR(B9="",C9="",D9="",E9="",F9=""),"",
    IF(OR(B9>=1,C9>=4),"Fail",
    IF(OR(AND(C9>=1,C9<=3),D9>=4),"Unsatisfactory",
    IF(AND(D9>=1,D9<=3),"Needs Improvement",
    IF(E9>=1,"Fair",
    IF(F9>=1,"good",
    IF(SUM(B9:F9)=0,"Excellent",
    "criteria not correct entered"))))))))

    You are a start, thank you so much for your help it is appreciated.
    Hope you have a great day.

  11. #11
    Registered User
    Join Date
    04-21-2018
    Location
    Leeds
    MS-Off Ver
    365
    Posts
    24

    Re: If statement or Alternative

    Hi AliGW,

    Brilliant, it works.

    I have changed it a little bit, see below.

    =IF(AND(B9="",C9="",D9="",E9="",F9=""),"",
    IF(OR(B9="",C9="",D9="",E9="",F9=""),"",
    IF(OR(B9>=1,C9>=4),"Fail",
    IF(OR(AND(C9>=1,C9<=3),D9>=4),"Unsatisfactory",
    IF(AND(D9>=1,D9<=3),"Needs Improvement",
    IF(E9>=1,"Fair",
    IF(F9>=1,"good",
    IF(SUM(B9:F9)=0,"Excellent",
    "criteria not correct entered"))))))))

    You are a start, thank you so much for your help it is appreciated.
    Hope you have a great day

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,833

    Re: If statement or Alternative

    cool tweak from AliGW
    never would have thought of that ... power of the forums

    anyway
    Glad to have helped

  13. #13
    Registered User
    Join Date
    04-21-2018
    Location
    Leeds
    MS-Off Ver
    365
    Posts
    24

    Re: If statement or Alternative

    Hi etaf,

    You have helped in a big way, understand more about about the ordering because of you, for that Kudos to you.

    Have a great evening etaf

  14. #14
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,833

    Re: If statement or Alternative

    will do and yourself

  15. #15
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: If statement or Alternative

    Please, not IF(AND(B9="",C9="",D9="",E9="",F9=""),"", use IF(CONCAT(B9:F9)="",""

    And this could look more well organized.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by DJunqueira; 03-20-2024 at 11:16 AM.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,131

    Re: If statement or Alternative

    Quote Originally Posted by etaf View Post
    cool tweak from AliGW
    never would have thought of that ... power of the forums
    LOL! Teamwork ...

  17. #17
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: If statement or Alternative

    Agree!

  18. #18
    Registered User
    Join Date
    04-21-2018
    Location
    Leeds
    MS-Off Ver
    365
    Posts
    24

    Re: If statement or Alternative

    Hi DJunqueira,

    Brilliant, thank you so much.

    Hope you have a great day.

  19. #19
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: If statement or Alternative

    Tks for the feedback, glad to have helped.

+ 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. [SOLVED] Alternative to IF statement
    By alex-g in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-31-2022, 10:52 PM
  2. [SOLVED] Nested If/And Statement or an Alternative?
    By artikyulashun in forum Excel General
    Replies: 7
    Last Post: 11-15-2019, 09:47 AM
  3. [SOLVED] IF Statement Alternative
    By keith740 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2016, 11:11 PM
  4. [SOLVED] Alternative to IF statement?
    By adamdaniel143 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-23-2013, 10:01 PM
  5. Excel 2007 : Alternative to if statement ?
    By tommo49 in forum Excel General
    Replies: 4
    Last Post: 11-10-2009, 10:26 AM
  6. Alternative to a if statement
    By lynettel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-07-2008, 02:15 PM
  7. [SOLVED] alternative to if statement
    By Dan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-15-2006, 03:25 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