Last gratis effort for you, Thomas:

```
// This part generates an example table with two columns
for ( i = 0; i < 25; i++ ) {
setResult( "Area", i, random );
setResult( "kind", i, random );
}
// This part sorts all values in column "Area"
a = newArray( nResults );
for ( i = 0; i < nResults; i++ ) {
a[i] = getResult( "Area", i );
}
Array.sort( a );
for ( i = 0; i < nResults; i++ ) {
setResult( "Area", i, a[i] );
}
// This part sums all values in column "kind" and prints the result to the log-window
sum = 0;
for ( i = 0; i < nResults; i++ ) {
sum = sum + getResult( "kind", i );
}
print( sum );
exit();
// End
```

Now please learn how to code ImageJ macros which is really easy.

Have success

Herbie