# Summing a range of cells [closed]

I would like to sum a range - for example:

...A......B

1.John 1

2.Paul 2

3.Sue 1

4.Sue 3

sum(*column B where column A = Sue*) giving result 4
sum(*column B where column A = Paul*) giving result 2

Looks a bit like SQL really.

The only way I can think of getting round this is to create a "name" for each set of values in column A then sum(sue), sum(Paul) etc. This is a lot of work and it's horrible to use.

Edit: I have found that /Data/Define Range works a lot better for defining ranges, although it doesn't do the selection.

Is there a practical way of doing this?