+ Reply to Thread
Results 1 to 6 of 6

If then statement, multiple conditions, multiple actions using OR

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Atlanta, GA
    MS-Off Ver
    MS Excel 365
    Posts
    19

    Post If then statement, multiple conditions, multiple actions using OR

    I am having trouble using a fairly simple If then statement using OR. I have attached a sample file. I am simply trying to create a field with the new product group name, based on the old name. Column C is the old product group. Column D is where I want the new product group name to appear. In one statement, I want the formula to spell out:

    if C2 is Tools_Service then D2 is TLS OR

    if C2 is Software_Service then D2 is SAAS OR

    if C2 is Managed_Service then D2 is MSP OR

    if C2 is Cloud_Computing then D2 is CLD OR

    if C2 is Consulting_Service then D2 is CSLT OR

    if C2 is Angel_Funding then D2 is AFD
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: If then statement, multiple conditions, multiple actions using OR

    It would be easier to build up a little table with those values, and then you can use the VLOOKUP function. Put these values in G1:G6:

    Tools_Service
    Software_Service
    Managed_Service
    Cloud_Computing
    Consulting_Service
    Angel_Funding

    and then the corresponding values in H1:H6:

    TLS
    SAAS
    MSP
    CLD
    CSLT
    AFD

    and then you can use this formula in D2:

    =IFERROR(VLOOKUP(C2,$G$1:$H$6,2,0),"")

    and copy this down as far as you need to.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    07-21-2014
    Location
    Atlanta, GA
    MS-Off Ver
    MS Excel 365
    Posts
    19

    Re: If then statement, multiple conditions, multiple actions using OR

    worked perfectly thank you! Just curious...if I had used an IF Then OR statement, would it have been too many arguments?

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,714

    Re: If then statement, multiple conditions, multiple actions using OR

    No, you could have done it with this formula (put it in E2 to check):

    =IF(C2="Tools_Service","TLS",IF(C2="Software_Service","SAAS",IF(C2="Managed_Service","MSP",IF(C2="Cloud_Computing","CLD",IF(C2="Consulting_Service","CSLT",IF(C2="Angel_Funding","AFD",""))))))

    and you can see that you don't need to have any OR functions as they are implied as you move from one IF to the next.

    It's just easier to maintain a simple table and one function, rather than that large formula.

    Hope this helps.

    Pete

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: If then statement, multiple conditions, multiple actions using OR

    Probably not as the IF function accommodates 7 nesting levels

  6. #6
    Registered User
    Join Date
    07-21-2014
    Location
    Atlanta, GA
    MS-Off Ver
    MS Excel 365
    Posts
    19

    Re: If then statement, multiple conditions, multiple actions using OR

    Ok! So it really wasn't an OR condition after all. Thank you so much

+ 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] Multiple conditions and multiple actions-- Can it be done?
    By HeatherBelle79 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-14-2018, 07:05 PM
  2. IF Statement with Multiple Conditions and Multiple True/False Results
    By ellesutgr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-03-2015, 04:51 PM
  3. Replies: 2
    Last Post: 07-09-2015, 04:25 PM
  4. [SOLVED] Multiple Actions with an IF Statement
    By HangMan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-14-2013, 12:03 PM
  5. Replies: 6
    Last Post: 10-13-2011, 06:38 AM
  6. If Statement with multiple conditions
    By Cdoyle in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-01-2011, 10:58 AM
  7. [SOLVED] If statement using multiple conditions
    By SCOOBYDOO in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 02:05 AM

Tags for this Thread

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