I am not sure of the best way of formulating this question right now so I will use an example using random numbers. I start with values assigned to IDs, so that each ID can be n=1, n=2, ... etc

```
ID Value
1 1235
1 326
1 567
2 768
2 646
3 4367
3 346
3 35
4 436
5 3467
5 46
6 3467
6 3532
6 457
7 3463
7 3463
7 9328
7 2498
```

etc

I want to calculate in Excel/Calc the Average and SD so that the values are properly aligned (ideally there would be merged cells), given its one, two, three... etc cells of input, one cell of output.

Example Screenshot:

What I want to obtain. AVG and SD mean proper values for the (random) given data; thus AVG and SD are properly aligned]1

I want, that is, an automated way of calculating the Average and SD having into account different n, so that it is properly aligned/formatted.

There must be an easy way of doing it but right now I am clueless. -_-

I'd appreciate any suggestion.