if and else condition
-
Hi i have develop tax calculator with CFF but facing some problem in one condition
i have formula in excel as follow
=IF(B5<=5000000,0,IF(B5<=10000000,IF((C8+C10-1237500)>(B5-5000000),C8+C10-1237500-(B5-5000000),0),IF(B5<=20000000,IF((C8+C10-3011250)>(B5-10000000),(C8+C10-3011250)-(B5-10000000),0),IF(B5<=50000000,IF((C8+C10-6598125)>(B5-20000000),(C8+C10-6598125)-(B5-20000000),0),IF(B5>50000000,IF((C8+C10-18421875)>(B5-50000000),(C8+C10-18421875)-(B5-50000000),0))))))and CFF form is
(function(){
if(fieldname4<5000000)
return fieldname4*0;
if(fieldname4 <= 10000000 && fieldname12 + fieldname14 -1237500 > fieldname4 – 5000000)return fieldname12+fieldname14-1237500-(fieldname4-5000000);
if(fieldname4 <= 20000000 && fieldname12 + fieldname14 -3011250 > fieldname4 – 10000000)
return fieldname12+fieldname14-3011250-(fieldname4-10000000);if(fieldname4 <= 50000000 && fieldname12 + fieldname14 -6598125 > fieldname4 – 20000000)
return fieldname12+fieldname14-6598125-(fieldname4-20000000);
if(fieldname4 > 50000000&& fieldname12 + fieldname14 -18421875 > fieldname4 – 50000000)
return fieldname12+fieldname14-18421875-(fieldname4-50000000);
})();
some condition is not working properly please help me
- The topic ‘if and else condition’ is closed to new replies.