I'm not a usual excel user but i know excel can do wonders. I tried to used truncate for my assignment in which a price of product is calculated by summing a few components. One of the component is a de-escalation factor depending on quality (viscosity index) of the product.
"The price is to be reduced by $0.04/unit for each whole one tenth of the viscosity index below 34 down to 27,
and by $0.06/unit for each whole one tenth of the viscosity index below 27
and to be increased by $0.04/unit for each whole one tenth of the viscosity index above 34"
My product has viscosity index of 26.60. My manual calculation is like below:
((27-34)*10*$0.04)) + ((26.60-27)*10*$0.06)): -$3.04
I tried to put in excel formula as below but the result is not the same:
IF(I8>=34,TRUNC((34-I8)/0.1,0)*-0.04,IF(I8>=27,TRUNC((I8-34)/0.1,0)*0.04,(TRUNC((27-34)/0.1,0)*0.04)+(TRUNC((I8-27)/0.1,0)*0.06))) : -$2.98
I8 is 26.6
I have been trying to check what cause the difference and i think the truncate part is causing the inconsistency
(TRUNC((27-34)/0.1,0)*0.04)+(TRUNC((-0.4)*10,0)*0.06) : -$3.04
(TRUNC((27-34)/0.1,0)*0.04)+(TRUNC((26.6-27)*10,0)*0.06) : -$2.98
Can experts here help me solve this mystery (at least a mystery for me) ?
Bookmarks