Need a formula'm%20having%20troubles%20entering%20a%20if%2For%20statement.%3CBR%20%2F%3E%3CBR%20%2F%3EBasically%2C%20I'm%20trying%20to%20have%20a%20function%20for%20cell%20B2%20%22if%20A1%20shows%20%22%2460%22%2C%20then%20display%20%24500%2C%20or%20if%20A1%20is%20%24120%2C%20then%20display%20%22%241%2C000%22.%20If%20neither%2C%20display%20%22%240%22%20%22%3CBR%20%2F%3E%3CBR%20%2F%3EEverything%20I%20try%20is%20showing%20as%20entered%20incorrectly.%3CBR%20%2F%3EPLEASE%20HELP%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2976813%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABE
New Contributor
Hi all.

I'm having troubles entering a if/or statement.

Basically, I'm trying to have a function for cell B2 "if A1 shows "$60", then display $500, or if A1 is $120, then display "$1,000". If neither, display "$0" "

Everything I try is showing as entered incorrectly.
5 Replies




Is this what you are looking for? I understand that you want to enter "$60" or "$120" in A1, not "60" or "120".

Your formula is giving me "0" no matter if I type 60 or 120.

Basically, in A1, I have our pet rent, which is either one or two pets. $60 per pet, max 2 pets.

In B2, am inputting our pet fee, 500 for 1 pet, $1000 for 2.

I appreciate the help.
best response confirmed by Sergei Baklan (MVP)




Enter above formula in B2 and it returns 500 when 60 is entered in A1 or it returns 1000 when 120 is entered in A1 (or it returns 0 if neither 60 nor 120 is in A1).


BAM! Got it! Thank you so much!


As variant

=500*SUM( ( {60;120}=A1)*{1;2} )