Assuming the data table provided:
A B
1 Ram 15
2 Sham 18
3 Rohit 10
4 Ram 10
5 Ram 12
6 Sham 8
If you want the sum of marks of Ram in column B:
C D
Ram 37 (15 + 10 + 12)
Sham 26 (18 + 8)
Rohit 10
A B
1 Ram 15
2 Sham 18
3 Rohit 10
4 Ram 10
5 Ram 12
6 Sham 8
If you want the sum of marks of Ram in column B:
C D
Ram 37 (15 + 10 + 12)
Sham 26 (18 + 8)
Rohit 10