Hi all,
I am trying to round mid-way numbers to the closest even numbers with a certain precision for three seperate ranges:
0-50k,50 to 100k and over 100k with precisions 100, 500 and 1000 respectivly (round 1.5 to 2 and 2.5 to 2 and for non decimal rounding multiply the value, apply rounding procedure and then divide the result). an example would be 75250 would be multiplied by 2 to get 150500, then round using 1000 place to nearest even thousand, giving 150000, then divide by 2 to get 75000. but 75750 would give 76000 based on the same procedure (rounding to nearest thousand after doubling)
I have written a function that does this as follows (please provide a simpler one if you may)
=IF(B8/B6>=100000,IF(ABS(B8/B6-FLOOR(B8/B6,1000))<>500,(ROUND(B8/B6,-3)),IF
(ISEVEN((FLOOR(B8/B6,1000)/1000)),FLOOR(B8/B6,1000),FLOOR(B8/B6,1000)+1000)
),IF(AND(B8/B6<100000,B8/B6>=50000),IF(ABS(B8/B6-FLOOR(B8/B6,500))<>250,(RO
UND(2*B8/B6,-3)/2),IF(ISEVEN((FLOOR(2*B8/B6,1000)/1000)),FLOOR(B8/B6,500),F
LOOR(B8/B6,500)+500)),IF(ABS(B8/B6-FLOOR(B8/B6,100))<>50,ROUND(B8/B6,-2),IF
(ISEVEN((FLOOR(B8/B6,100)/100)),FLOOR(B8/B6,100),FLOOR(B8/B6,100)+100))))
I wrote the code in excel and hoped it would work in word, as has been the case many times before with simple IF statements. I am trying to use an insert field calculation in word 2000, and all the text is there but i get the "syntax error (" remark, but i get a value from excel with the same formula(it is not a data reference error). When I tried using a form field I was limited by the number of characters. I cant get it to work in word
Can someone please advise. I would like to avoid coding anything, since I don't know vb at all.
I am trying to round mid-way numbers to the closest even numbers with a certain precision for three seperate ranges:
0-50k,50 to 100k and over 100k with precisions 100, 500 and 1000 respectivly (round 1.5 to 2 and 2.5 to 2 and for non decimal rounding multiply the value, apply rounding procedure and then divide the result). an example would be 75250 would be multiplied by 2 to get 150500, then round using 1000 place to nearest even thousand, giving 150000, then divide by 2 to get 75000. but 75750 would give 76000 based on the same procedure (rounding to nearest thousand after doubling)
I have written a function that does this as follows (please provide a simpler one if you may)
=IF(B8/B6>=100000,IF(ABS(B8/B6-FLOOR(B8/B6,1000))<>500,(ROUND(B8/B6,-3)),IF
(ISEVEN((FLOOR(B8/B6,1000)/1000)),FLOOR(B8/B6,1000),FLOOR(B8/B6,1000)+1000)
),IF(AND(B8/B6<100000,B8/B6>=50000),IF(ABS(B8/B6-FLOOR(B8/B6,500))<>250,(RO
UND(2*B8/B6,-3)/2),IF(ISEVEN((FLOOR(2*B8/B6,1000)/1000)),FLOOR(B8/B6,500),F
LOOR(B8/B6,500)+500)),IF(ABS(B8/B6-FLOOR(B8/B6,100))<>50,ROUND(B8/B6,-2),IF
(ISEVEN((FLOOR(B8/B6,100)/100)),FLOOR(B8/B6,100),FLOOR(B8/B6,100)+100))))
I wrote the code in excel and hoped it would work in word, as has been the case many times before with simple IF statements. I am trying to use an insert field calculation in word 2000, and all the text is there but i get the "syntax error (" remark, but i get a value from excel with the same formula(it is not a data reference error). When I tried using a form field I was limited by the number of characters. I cant get it to work in word
Can someone please advise. I would like to avoid coding anything, since I don't know vb at all.