Home

excel if calculations

%3CLINGO-SUB%20id%3D%22lingo-sub-867163%22%20slang%3D%22en-US%22%3Eexcel%20if%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-867163%22%20slang%3D%22en-US%22%3E%3CP%3Ecan%20someone%20help%20with%20the%20correct%20formula%20for%20the%20following%3B%3C%2FP%3E%3CP%3Eif%20(B3%20%3D%201%20then%20M8)%2C%20if%20(B3%20%3D%202%20then%20N8)%2C%20if%20(B3%20%3D%203%20then%20O8)%26nbsp%3B%3C%2FP%3E%3CP%3Emany%20thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-867163%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-867172%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20if%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-867172%22%20slang%3D%22en-US%22%3E%3CP%3Etry%3A%3C%2FP%3E%3CP%3E%3DIFS(B3%3D1%2CM8%2CB3%3D2%2CN8%2CB3%3D3%2CO8)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-867173%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20if%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-867173%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F412420%22%20target%3D%22_blank%22%3E%40alian1953%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20try%20below%20formula%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000FF%22%3E%3CSTRONG%3E%3DIF(B3%3D1%2CM8%2CIF(B3%3D2%2CN8%2CO8))%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3ETauqeer%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-867235%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20if%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-867235%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F412420%22%20target%3D%22_blank%22%3E%40alian1953%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20could%20be%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DCHOOSE(B3%2CM8%2CN8%2CO8)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eor%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DINDEX(M8%3AO8%2CB3)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-867260%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20if%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-867260%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECHOOSE%20works%20great%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-867270%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20if%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-867270%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F412417%22%20target%3D%22_blank%22%3E%40finaly%3C%2FA%3E%3C%2FP%3E%3CP%3EYour%20suggestion%20works.%3C%2FP%3E%3CP%3EI%20have%2020%20rows%20i%20need%20to%20apply%20this%20too%2C%20when%20I%20drag%20the%20calculation%20down%20the%20rows%20it%20obviously%20changes%20the%20B3%20to%20B4%20and%20so%20on%2C%20I%20need%20the%20B3%20input%20to%20remain%20constant%20where%20the%20M%20N%20%26amp%3B%20O%20can%20ascend%2C%20any%20suggestions%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-867335%22%20slang%3D%22en-US%22%3ERe%3A%20excel%20if%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-867335%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F412420%22%20target%3D%22_blank%22%3E%40alian1953%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20any%20of%20above%20formulas%20use%20absolute%20reference%20for%20B3%20and%20relative%20one%20for%20others%2C%20like%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DCHOOSE(%24B%243%2C%24M8%2C%24N8%2C%24O8)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
alian1953
New Contributor

can someone help with the correct formula for the following;

if (B3 = 1 then M8), if (B3 = 2 then N8), if (B3 = 3 then O8) 

many thanks

6 Replies

try:

=IFS(B3=1,M8,B3=2,N8,B3=3,O8)

Hi @alian1953 

 

Please try below formula:

 

=IF(B3=1,M8,IF(B3=2,N8,O8))

 

Thanks

Tauqeer

@alian1953 

It could be

=CHOOSE(B3,M8,N8,O8)

or

=INDEX(M8:O8,B3)

Thank you @Sergei Baklan 

CHOOSE works great 

Thank you @finaly

Your suggestion works.

I have 20 rows i need to apply this too, when I drag the calculation down the rows it obviously changes the B3 to B4 and so on, I need the B3 input to remain constant where the M N & O can ascend, any suggestions?  

@alian1953 

In any of above formulas use absolute reference for B3 and relative one for others, like

=CHOOSE($B$3,$M8,$N8,$O8)

 

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Edge insider Dev bypasses IE mode website list
HotCakeX in Enterprise on
4 Replies