Home

IF function

%3CLINGO-SUB%20id%3D%22lingo-sub-1180706%22%20slang%3D%22en-US%22%3EIF%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1180706%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22qexle_0-1582063069299.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F171890i8BA82162B2E9F0E4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22qexle_0-1582063069299.png%22%20alt%3D%22qexle_0-1582063069299.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(C%3AC%26gt%3B%3D100000%2CC%3AC%2F100*5%2B((C%3AC-100000)%2F100*2)%2CIF(C%3AC%26gt%3B%3D50000%2CC%3AC%2F100*5%2C0))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETrying%20to%20make%20this%20IF%20function%20into%20separate%20functions%20and%20then%20adding%20them%20together(%3DA1%2BB1%2BC1)%20and%20get%20the%20same%20result%2C%20but%20i%20dont%20know%20how..%3C%2FP%3E%3CP%3EBtw%20no%20matter%20how%20much%20i%20google%20i%20find%20no%20answer%20on%20this%3B%20how%20does%20the%20%22C%3AC%22%20in%20this%20function%20work%3F%20Does%20it%20just%20get%20the%20C%20cell%20from%20the%20same%20row%3F%20Is%20there%20a%20better%20way%20to%20do%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1180706%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%3ETraining%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1180752%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1180752%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F562488%22%20target%3D%22_blank%22%3E%40qexle%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBetter%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DIF(C2%26gt%3B%3D100000%2CC2%2F100*5%2B((C2-100000)%2F100*2)%2CIF(C2%26gt%3B%3D50000%2CC2%2F100*5%2C0))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EOn%20Excel%20with%20dynamic%20arrays%20your%20function%20will%20return%20an%20error.%20On%20previous%20versions%20of%20Excel%20it'll%20be%20the%20same%20result%20as%20for%20previous%20function.%3C%2FP%3E%0A%3CP%3EBit%20more%20better%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DIF(C2%26gt%3B%3D100000%2CC2*5%2B((C2-100000)*2)%2CIF(C2%26gt%3B%3D50000%2CC2*5%2C0))%2F100%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EIf%20that%20is%20Table%20in%20your%20example%20when%20better%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DIF(%5B%40SALG%5D%26gt%3B%3D100000%2C%5B%40SALG%5D*5%2B((%5B%40SALG%5D-100000)*2)%2CIF(%5B%40SALG%5D%26gt%3B%3D50000%2CC2*5%2C0))%2F100%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDidn't%20catch%20the%20main%20question%2C%20on%20which%20functions%20you'd%20like%20to%20separate%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1180772%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1180772%22%20slang%3D%22en-US%22%3E%3CP%3E%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%3EThanks!%20That%20really%20helps%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIm%20just%20trying%20to%20learn%20a%20bit%20more%20about%20excel%2C%20and%20figured%20that%20i%20could%20calculate%20some%20of%20these%20in%20different%20cells%20and%20then%20add%20them%20together%20after.%20Just%20to%20make%20it%20easier%20to%20see%20what%20the%20function%20actually%20do.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20an%20easy%20way%20to%20make%20this%202%20functions%20and%20then%20just%20add%20the%20results%3F%20A1%2BB1%20etc%3F%3C%2FP%3E%3CP%3E%3CSPAN%3EC%3AC%2F100*5%2B((C%3AC-100000)%2F100*2)%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1181603%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1181603%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F562488%22%20target%3D%22_blank%22%3E%40qexle%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESorry%2C%20I%20didn't%20catch.%20Could%20you%20please%20clarify%20what%20is%20first%20function%2C%20what%20is%20the%20second%20function%20and%20what%20exactly%20shall%20be%20in%20cells%20A1%2C%20B1%2C%20C1%20and%20D1%20(and%20others%20if%20that's%20the%20case).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1185486%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1185486%22%20slang%3D%22en-US%22%3E%3CP%3E%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%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20figured%20it%20out.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(C2%26gt%3B%3D50000%2CC2*0.05%2C0)%3C%2FP%3E%3CP%3Eand%20next%20cell%3C%2FP%3E%3CP%3E%3DIF(C2%26gt%3B%3D100000%2C(C2-100000)*0.02%2C0)%3C%2FP%3E%3CP%3Eand%20last%20cell%3C%2FP%3E%3CP%3E%3DC2%2BC3%2BC4%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

qexle_0-1582063069299.png

 

 

=IF(C:C>=100000,C:C/100*5+((C:C-100000)/100*2),IF(C:C>=50000,C:C/100*5,0))

 

Trying to make this IF function into separate functions and then adding them together(=A1+B1+C1) and get the same result, but i dont know how..

Btw no matter how much i google i find no answer on this; how does the "C:C" in this function work? Does it just get the C cell from the same row? Is there a better way to do this?

4 Replies
Highlighted

@qexle 

Better

=IF(C2>=100000,C2/100*5+((C2-100000)/100*2),IF(C2>=50000,C2/100*5,0))

On Excel with dynamic arrays your function will return an error. On previous versions of Excel it'll be the same result as for previous function.

Bit more better

=IF(C2>=100000,C2*5+((C2-100000)*2),IF(C2>=50000,C2*5,0))/100

If that is Table in your example when better

=IF([@SALG]>=100000,[@SALG]*5+(([@SALG]-100000)*2),IF([@SALG]>=50000,C2*5,0))/100

 

Didn't catch the main question, on which functions you'd like to separate?

Highlighted

@Sergei Baklan 

Thanks! That really helps

 

Im just trying to learn a bit more about excel, and figured that i could calculate some of these in different cells and then add them together after. Just to make it easier to see what the function actually do.

 

Is there an easy way to make this 2 functions and then just add the results? A1+B1 etc?

C:C/100*5+((C:C-100000)/100*2)

Highlighted

@qexle 

Sorry, I didn't catch. Could you please clarify what is first function, what is the second function and what exactly shall be in cells A1, B1, C1 and D1 (and others if that's the case).

Highlighted

@Sergei Baklan 

 

I figured it out.

 

=IF(C2>=50000,C2*0.05,0)

and next cell

=IF(C2>=100000,(C2-100000)*0.02,0)

and last cell

=C2+C3+C4

Related Conversations
Make Share function in Edge more useful
HotCakeX in Discussions on
2 Replies
function talking to table storage
donquijote in Compute on
0 Replies
Calculated column help
gopalaraoa in SharePoint on
1 Replies
Excel If Functions
Mfouad2255 in Excel on
10 Replies