Dear ALL;
i define an earning (ann_sal) and a deduction (assur) is a percentage of total earnings i need to define another deduction (IR) :
X = (10% * ann_sal ) - (assur)
for this X is divided into slices
between X=0 and X= 1000 ->IR = 10%*X
between X =1000 and X=2000 -> IR=15%*X
when X>2000 IR=25% *X
example1 : X= 1800
IR = (10% * 1000) + (15% * 800)
example2 : X= 2300
IR = (10% * 1000) + (15% * 1000) + (25% * 300)
example3 : X= 3500
IR =( 10% * 1000) + (15% * 1000 ) + ( 25% * 500)
CAN ANYONE HELP ME TO DEFINE THIS FORMULA...please
best regards
SAMI
fast formula help
Dear Sami
Try the below formula
X = (annl_sal * 0.1) - (assur)
IF X >= 1000 THEN
(
IR = (X * 0.1)
RETURN IR
)
ELSE IF X < 1000 AND X >= 2000 THEN /* X = 1800 */
(
a = (1000 * 0.1) /* a = 1000 * 0.1 = 100 */
Y = X - 1000 /* Y = 1800 - 1000 = 800 */
IR = a + (Y * 0.15) /* IR = 100 + 120 = 220 */
RETURN IR
)
ELSE IF X < 2000 THEN /* X = 2300 */
(
a = (1000 * 0.1) /* a = 1000 * 0.1 = 100 */
b = (1000 * 0.15) /* b = 1000 * 0.15 = 150 */
Y = X - 2000 /* Y = 2300 - 2000 = 300 */
IR = (a + b) + (Y * 0.25) /* IR = (100 + 150) + 75 = 325 */
RETURN IR
)
I hope this will help you...
Regards
Kalil
Try the below formula
X = (annl_sal * 0.1) - (assur)
IF X >= 1000 THEN
(
IR = (X * 0.1)
RETURN IR
)
ELSE IF X < 1000 AND X >= 2000 THEN /* X = 1800 */
(
a = (1000 * 0.1) /* a = 1000 * 0.1 = 100 */
Y = X - 1000 /* Y = 1800 - 1000 = 800 */
IR = a + (Y * 0.15) /* IR = 100 + 120 = 220 */
RETURN IR
)
ELSE IF X < 2000 THEN /* X = 2300 */
(
a = (1000 * 0.1) /* a = 1000 * 0.1 = 100 */
b = (1000 * 0.15) /* b = 1000 * 0.15 = 150 */
Y = X - 2000 /* Y = 2300 - 2000 = 300 */
IR = (a + b) + (Y * 0.25) /* IR = (100 + 150) + 75 = 325 */
RETURN IR
)
I hope this will help you...
Regards
Kalil
Who is online
Users browsing this forum: No registered users and 0 guests