+ Reply to Thread
Results 1 to 9 of 9

I am new and having trouble adding a result from IF function

  1. #1
    Registered User
    Join Date
    11-30-2019
    Location
    ADDIS ABABA,ETHIOPIA
    MS-Off Ver
    2016
    Posts
    4

    I am new and having trouble adding a result from IF function

    I am having touble adding a result from IF function
    =IF(A1="banana","3",IF(A1="apple","5"))
    as a result i am getting this numbers and i would like to add them

    thank you in advance

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

    Re: I am new and having trouble adding a result from IF function

    Hi and welcome
    numbers between double quotes are considered text
    so try =IF(A1="banana",3,IF(A1="apple",5))

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I am new and having trouble adding a result from IF function

    Hi and welcome to the forum

    Please explain what result you expect for a series of inputs. Create a small excel file and add the results you want for different permutations of fruits.

    At the moment A1 only contains EITHER banana or apple, hence what's your logic for adding 3 & 5 which is what I think you're saying but even that isn't clear.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: I am new and having trouble adding a result from IF function

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    11-30-2019
    Location
    ADDIS ABABA,ETHIOPIA
    MS-Off Ver
    2016
    Posts
    4

    Re: I am new and having trouble adding a result from IF function

    3 and 5 were supposed to be price so assume when A1 is banana I get 3 in B1 and A2 is apple I get 5 on B2 and if A3 is banana again i get 3 on B3...what i would like to do is add whatever is on B1,B2,B3 i.e 3+5+3 but that isn't happening.

  6. #6
    Registered User
    Join Date
    11-30-2019
    Location
    ADDIS ABABA,ETHIOPIA
    MS-Off Ver
    2016
    Posts
    4

    Re: I am new and having trouble adding a result from IF function

    oh thank u now it works

  7. #7
    Registered User
    Join Date
    11-30-2019
    Location
    ADDIS ABABA,ETHIOPIA
    MS-Off Ver
    2016
    Posts
    4

    Re: I am new and having trouble adding a result from IF function

    thank u n i would have given the rep point twice too lol

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,432

    Re: I am new and having trouble adding a result from IF function

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,155

    Re: I am new and having trouble adding a result from IF function

    You're welcome.

    And what value would you want if it is neither apple nor banana?



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Trouble with Code - Adding New Record with Form does not function
    By JJFletcher in forum Excel Formulas & Functions
    Replies: 34
    Last Post: 09-13-2015, 11:22 AM
  2. adding result of a function to a cell already containing a value
    By Amir2007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-31-2015, 02:34 PM
  3. INDEX formula trouble, doesn't show expected result
    By Tacita in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-14-2015, 12:33 PM
  4. Replies: 4
    Last Post: 06-04-2013, 01:57 PM
  5. [SOLVED] Trouble with a formula, the result leaves out the commas
    By norrillous in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-30-2013, 07:33 AM
  6. Excel 2007 : trouble adding an additional IF function
    By TEdward00 in forum Excel General
    Replies: 1
    Last Post: 07-07-2011, 05:05 PM
  7. Trouble cleaning filter result.
    By SteveLou in forum Excel General
    Replies: 4
    Last Post: 10-18-2008, 05:33 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