IF function

Copper 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

@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?

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

@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).

@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