RETAILREALM
asked on
Apply Rounding Rules
Hi,
I want perform price rounding operation as follows
1. When Price > 0 and Price < 500 make it multiple of 10
2. When Price > 0 and Price < 500 end price with 1.1
3. When Price > 0 and Price < 500 make it multiple of 10 and end with 1.1
It can be to round to nearest, round up or round down operation,
For eg.
With 3 rd point operation round to nearest--> I should get -->
Old Value Round to near Round Up Round Down
-8.00 -8.00 -8.00 -8.00
0.00 0.00 0.00 0.00
0.50 11.01 11.01 1.01
5.00 11.01 11.01 1.01
12.99 11.01 21.01 1.01
79.99 81.01 101.01 69.01
Please provide some hints, formulas. with sql or vb 6 program
I want perform price rounding operation as follows
1. When Price > 0 and Price < 500 make it multiple of 10
2. When Price > 0 and Price < 500 end price with 1.1
3. When Price > 0 and Price < 500 make it multiple of 10 and end with 1.1
It can be to round to nearest, round up or round down operation,
For eg.
With 3 rd point operation round to nearest--> I should get -->
Old Value Round to near Round Up Round Down
-8.00 -8.00 -8.00 -8.00
0.00 0.00 0.00 0.00
0.50 11.01 11.01 1.01
5.00 11.01 11.01 1.01
12.99 11.01 21.01 1.01
79.99 81.01 101.01 69.01
Please provide some hints, formulas. with sql or vb 6 program
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Conditions 1, 2 and 3 are all the same. i.e. When Price > 0 and Price < 500
Youer examples do not tally with statements 1, 2 or 3.