+ Reply to Thread
Results 1 to 4 of 4

IF function for several options

  1. #1
    Registered User
    Join Date
    11-22-2016
    Location
    Oxford, England
    MS-Off Ver
    2007
    Posts
    45

    IF function for several options

    Hi,

    I have a large and complex table in Excel where we need a quick and easy visual indicator in column A that will highlight if there are any issues that need to be checked.

    Please see attached simplified table that I hope will help to demonstrate what I need to happen.

    Column A is where I want the IF function
    Column E will be entered manually, and if a "YES" is entered here, we want the site automatically blocked (this happens in Column K)
    Columns F; G and I will be filled in manually by the team using the spreadsheet
    Column K has a basic formula to automatically block a new site (until the site is checked and approved, then the yes in here will be deleted by the person making the approval), unless it is not a new site, but there is a reason to block it - then the YES would be entered manually.

    Column M is a status (fed by other columns that I have removed, but I have left the different results that might show to let you see)

    Basically, I would like the following to happen:
    IF cell F2 shows YES, cell A2 should show nothing
    If Cell G2 or I2, show either LR or HR, cell A2 should show CONDITIONAL
    If cell K2 shows YES, then A2 should show BLOCKED
    If cells F2 - K2 are all blank, then A2 should show the information in cell M2, however if there is no value in cell M2, it should show the word CHECK

    I can figure most of it out, but it all goes wrong when I want it to check the range (F2:K2) and I think that it is because of the formula in column K, and the formula in Column M, and I cannot figure my head around it.

    To assist on the table attached, I have entered comments with the values I would like to see in the cells in Column A

    Any help is much appreciated.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: IF function for several options

    This should do:

    =IF(F2="YES","",IF(OR(OR(G2="LR",G2="HR"),OR(I2="LR",I2="HR")),"CONDITIONAL",IF(K2="YES","BLOCKED",IF(AND(F2="",G2="",I2="",K2="",M2=""),"CHECK",IF(AND(F2="",G2="",I2="",K2=""),M2)))))

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: IF function for several options

    May be the below one
    a2=IF(F2="YES","",IF(OR(G2={"LR","HR"},I2={"LR","HR"}),"CONDITIONAL",IF(K2="YES","BLOCKED",IF(AND(F2="",K2=""),IF(M2="","CHECK",M2),""))))
    Please Login or Register  to view this content.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Registered User
    Join Date
    11-22-2016
    Location
    Oxford, England
    MS-Off Ver
    2007
    Posts
    45

    Re: IF function for several options

    Brilliant, thank you both for your help with this.

+ 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] 4 options using IF function
    By StephenDZi in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-05-2017, 04:13 PM
  2. If function to choose between three options
    By jmankey in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-15-2015, 02:39 AM
  3. HELP! me with IF function, with nested options.
    By erbmitman in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-23-2014, 08:31 AM
  4. IF function with 3 options
    By Airka1129 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-11-2014, 11:16 AM
  5. IF / OR / Function 3 options
    By Tyriel in forum Excel General
    Replies: 2
    Last Post: 07-15-2013, 02:41 PM
  6. IF function with multiple options
    By PAKTIRE in forum Excel General
    Replies: 1
    Last Post: 10-30-2009, 03:09 AM
  7. IF-function with multiple options+sum function
    By PALLE123 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-01-2007, 09:42 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