How to group data?

K

ki

Hi.

Example: list of numeric data: 345, 123, 154, 234,.....(milimeters)
When number is between 110 and 130 then it is 120, when between 131 and 150
then it is 140, and so on.
The result should be for the same list: 340, 120, 160, 240,...(milimeters)
It means that I need to group datas in classes of 20 milimeters.

Is there some short way to get it? I tryed something with many, many IFs,
but it is not so simple.
Can anyone help me?
Thanx.

ki
 
J

Jan Karel Pieterse

Hi Ki,
Example: list of numeric data: 345, 123, 154, 234,.....(milimeters)
When number is between 110 and 130 then it is 120, when between 131 and 150
then it is 140, and so on.
The result should be for the same list: 340, 120, 160, 240,...(milimeters)
It means that I need to group datas in classes of 20 milimeters.

If your number is in cell A1:

=INT(A1/20+0.5)*20

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
 
Top