Hello everyone,
I wanted to converted numeric values in a column to rating scales from 0 - 10. The scheme is:
ER < -10.0% 0
-10.0% <= ER < -5.0% 1
-5.0% <= ER < -2.0% 2
-2.0% <= ER < -0.5% 3
-0.5% <= ER < -0.1% 4
-0.1% <= ER < 0.1% 5
0.1% <= ER < 0.5% 6
0.5% <= ER < 2.0% 7
2.0% <= ER < 5.0% 8
5.0% <= ER < 10.0% 9
ER >= 10.0% 10
But is there a better way to define this UDF for my purpose? I feel the If, Elseif, Else statements are not that tidy at all.Please Login or Register to view this content.
Many thanks in advance.
Bookmarks