SOLVED

Need a formula

%3CLINGO-SUB%20id%3D%22lingo-sub-2976874%22%20slang%3D%22en-US%22%3EBetreff%3A%20Need%20a%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2976874%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1221844%22%20target%3D%22_blank%22%3E%40BRANDON07%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(A1%3D%22%2460%22%2C%22%24500%22%2CIF(A1%3D%22%24120%22%2C%22%241000%22%2C%22%22))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20what%20you%20are%20looking%20for%3F%20I%20understand%20that%20you%20want%20to%20enter%20%22%2460%22%20or%20%22%24120%22%20in%20A1%2C%20not%20%2260%22%20or%20%22120%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2976813%22%20slang%3D%22en-US%22%3ENeed%20a%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2976813%22%20slang%3D%22en-US%22%3EHi%20all.%3CBR%20%2F%3E%3CBR%20%2F%3EI'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-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2976927%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20a%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2976927%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1221844%22%20target%3D%22_blank%22%3E%40BRANDON07%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(A1%3D%22%2460%22%2C%22%24500%22%2CIF(A1%3D%22%24120%22%2C%22%241000%22%2C%22%3CSPAN%3E%240%3C%2FSPAN%3E%22))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20what%20you%20are%20looking%20for%3F%20I%20understand%20that%20you%20want%20to%20enter%20%22%2460%22%20or%20%22%24120%22%20in%20A1%2C%20not%20%2260%22%20or%20%22120%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E
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.
PLEASE HELP
5 Replies

@BRANDON07 

=IF(A1="$60","$500",IF(A1="$120","$1000","$0"))

 

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)
Solution

@BRANDON07 

=IF(A1=60,500,IF(A1=120,1000,0))

 

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!

@BRANDON07 

As variant

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