Hi,
I searched the forum but couldn't get any answer. Does anyone know how to round a number to nearest equal to higher tenth.
e.g.
12 --> 20
15 --> 20
1.4 --> 10
Thanks!
Round to nearest tenth
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 34
- Joined: Thu Aug 28, 2014 8:48 pm
- Location: United States
Code: Select all
INT((In.Column+10)/10)*10
Code: Select all
(10-MOD(In.Column,10))+In.Column
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
I use the "Ceil" mathematical function for decimal values, and you should see good results from this:
Code: Select all
(Ceil(In.column/10))*10
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872