Excel problem

Soldato
Joined
29 Mar 2007
Posts
4,068
Location
Manchester
For this array of data...

Code:
Activity	Hours
Activity 1	2
Activity 2	4
Activity 1	6
Activity 1	1
Activity 3	6
Activity 5	9
Activity 3	3
Activity 1	6
Activity 6	1
Activity 5	8

I want an equation that calculates the values in the second column here:

Code:
	Total
Activity 1	15
Activity 2	4
Activity 3	9
Activity 4	0
Activity 5	17
Activity 6	1

I'm sure there is a clever way of doing it with INDEX or MATCH, and I know you can use nested IF statements but if I had loads of activities it would be clunky. Anyone got a neat way of doing that?

Cheers
 
Yeh, it does. Cheers guys. Knew there would be an easy way.

=SUMIF(A2:B11,"Activity 1",B2:B11)

First time I tried it I messed it up but got it working now.
 
Back
Top Bottom