+ Reply to Thread
Results 1 to 5 of 5

Multiple if or formula

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Multiple if or formula

    I am trying to write a formula to do the following:

    If O2 = either D3,D5,D5, or S8 use code 1, If O2 = either S0,S1, or S2 use code 2, If O2 = SS use code 3.

    Thank you for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    06-23-2021
    Location
    Romania
    MS-Off Ver
    2021, 365 v 2208
    Posts
    722

    Re: Multiple if or formula

    D3,d5, d5?
    Diana Tanase


    If the solutions offered helped you to solve your problem, then mark the thread as SOLVED (thread tools in the top menu) and you can click on * to add reputation to those who helped you, as a way to say thank you !

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Multiple if or formula

    Assuming you meant D3, D4, D5 and not D3, D5, D5....

    =IF(OR(O2=D3,O2=D4,O2=D5,O2=S8),"code 1", IF(OR(O2=S0,O2=S1,O2=S2),"code 2",IF(O2=S??,"code 3",""))).

    Most of those look like cell refs, but the last 1 SS...was that a typo?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Multiple if or formula

    OH boy, it was actually easier than that guys. the codes I was using were actual codes NOT cell values. Ha... but its working so thanks!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Multiple if or formula

    Great, happy to help and thanks for the feedback

    If those are really just codes, you could probably save a lot of formula usage by making a small table and using vlookup.

+ 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: 1
    Last Post: 02-12-2021, 07:21 PM
  2. [SOLVED] Retrieving multiple text strings based on multiple criteria (formula update)
    By McKneezy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2019, 08:52 PM
  3. [SOLVED] Need Excel formula to use INDEX and MATCH with multiple criteria's over multiple ranges.?
    By mchilapur in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-22-2017, 08:56 AM
  4. Vlookup Formula to update multiple exchange rates for multiple products
    By jocpatch in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-24-2016, 08:36 PM
  5. Formula to Sum 3 Column Values based on Multiple Criteria for Multiple Rows
    By RMerckling in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2016, 07:46 PM
  6. Replies: 12
    Last Post: 02-10-2014, 11:59 AM
  7. Replies: 0
    Last Post: 11-08-2012, 01:07 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