Judging from the condition, the following result will be obtained (using the example of Google Таблицы ): Initial data (sheet name Лист1 ):

Result of grouping:

1st method:
- use the function
SUMIF ( SUMIF ), which finds the sum of the contents of cells that meet a specific condition; - For the grouping and summation of the
Значения by 1 column, the following formula would be =sumif(A2:A9;C2;A2:A9) , where
2.1. A2:A9 - the диапазон in which the search for cells that satisfy the condition;
2.2. C2 is a condition for searching for cells in a диапазоне . In our case, 1 ;
2.3. A2: A9 - the range, the cells of which are summarized.
Google SUMIF () Help
2nd method:
- Use
Сводные таблицы . - Select the menu item
Данные - Сводная таблица ; Creating a pivot sheet Сводная таблица ... 
In the Редакторе отчетов add:
6.1. In the Строки category, the column name Значения (Sheet Лист1 );
6.2. in the Значения category, the Значения field (sheet Лист1 ) (coincidence name ( Значения ) of category and column names). The default setting is SUM (summation of values). We get the result 
Help on creating a PivotTable by Google