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
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
Hi and welcome
numbers between double quotes are considered text
so try =IF(A1="banana",3,IF(A1="apple",5))
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 iconbelow the post.
TryFormula:![]()
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
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.
oh thank u now it works![]()
thank u n i would have given the rep point twice too lol
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.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks