By sum you mean the sum of the area?
You can use SUMIF()
.
=SUMIF(B:B,1,C:C)
For instance will give you the sum of all the codenb
equal to 1
.
B:B
is the column with the criteria (column codenb
);
1
is the codenb
that you're summing;
C:C
is the column containing the values to sum.
If you want to get a table with a summary of all the codenb
and the sum of each group of areas, then a PivotTable will be easiest/fastest.
- Insert a PivotTable on the table in a new sheet;
- Put (click + drag) column
codenb
in 'Row Labels' from the right pane;
- Put (click + drag) column
area
in 'Values' from the right pane;
- Make sure that the values are summarised by 'Sum'.