+ Reply to Thread
Results 1 to 7 of 7

Help with IF and OR Formula

  1. #1
    Registered User
    Join Date
    02-03-2012
    Location
    Merrimack Valley, MA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Help with IF and OR Formula

    I'm trying to simplify a spreadsheet and can't get it to work.

    If the cell contains "Apple" or "Lemon" enter 650 or if cell contains "Banana" enter 1300 or if cell contains "Orange" enter 350 or if cell contains "Cherry" enter 150, else enter 0. Right now it's done manually.

    Any help appreciated.

    K
    Attached Files Attached Files
    Last edited by XcelRookie; 04-03-2021 at 08:36 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,690

    Re: Help with IF and OR Formula

    The best way to do this is with a lookup table. Put a table like this into a sheet called Lookup:

    Apple 650
    Lemon 650
    Banana 1300
    Orange 350
    Cherry 150

    then the formula is

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,505

    Re: Help with IF and OR Formula

    Try
    =IF(OR(A1="Apple",A1="Lemon"),650,IF(A1="Banana",1300,IF(A1="Orange",350,IF(A1="Cherry",150,0))))

    Good luck!

  4. #4
    Registered User
    Join Date
    02-03-2012
    Location
    Merrimack Valley, MA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Help with IF and OR Formula

    Thank you so much!!!

    Happy Easter

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,690

    Re: Help with IF and OR Formula

    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking on the star icon addreputationiconsmall.jpg below their name.

  6. #6
    Registered User
    Join Date
    02-03-2012
    Location
    Merrimack Valley, MA
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Help with IF and OR Formula

    Thank you so much!

  7. #7
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,505

    Re: Help with IF and OR Formula

    You're welcome. Glad to help.
    Thank you for the feedback and for the reputation added.
    Have a blessed day!

+ 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: 3
    Last Post: 03-24-2020, 07:27 AM
  2. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  3. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  4. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  5. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  6. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  7. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04: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