Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Round UP function in SPSS

769 views
Skip to first unread message

kartikvashishta108

unread,
Dec 14, 2010, 5:25:26 PM12/14/10
to
Is there a round off function in spss, if not how can I do this. This
is what I am talking about for example if I have a number 12.4 - I
want it to be round UP to 13, if it is 15.3 I want it to round UP to
16.

Thanks

kartikvashishta108

unread,
Dec 14, 2010, 7:08:53 PM12/14/10
to

To clarify I want to truncate if it does not divide evenly, for
example if I am dividing 10 by 5 then the result 2 is acceptable, but
if I am dividing 15 by 2 then I want the result to be 8, how to
accomplish this in a function(s)

Brendan Halpin

unread,
Dec 15, 2010, 4:07:51 AM12/15/10
to

You're not truncating but raising it to the next highest integer. In
SPSS, TRUNC(12.4) is 12, not 13.

I don't have SPSS to hand, but I think it has a "ceiling" function which
does what you want: try CEILING(12.4) or CEIL(12.4).

If that doesn't work, try ROUND(12.4 + 0.49999999).

Brendan
--
Brendan Halpin, Department of Sociology, University of Limerick, Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F1-009 x 3147
mailto:brendan...@ul.ie http://www.ul.ie/sociology/brendan.halpin.html

0 new messages