# Conditional sum based on user choice

#### IanC

##### New Member
I'm totally unsure how to approach this problem...thus the post!

I have a list of three columns 'Name Task Hours'. am I am totalling the hours for each person. What I need the user to be able to do is to decide which of the tasks need to be included in the total for each person.

For example with the list...

Bob Gardening 8
Tom Walking 5
Bob Walking 4
Trevor Jumping 2
Bob Jumping 4
Tom Gardening 7

I need the user to be able to select what tasks should be used in determining the total. So in the above list, if the user decides to include Gardening and Walking the results would be...

Bob 12
Tom 5
Trevor 0

My initial idea is to create a dynamic list of tasks and have the user put in an 'X' in the cell next to the task name, but then how do I do the conditional sum (which currently uses SUMPRODUCT) if the task name is going to be different depending on the original data??

Very stuck on how to approach this one!!

### Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
You are on the right track, use sumif function for example if your data is in a1:a10, put x beside it (which is column b) then use =sumif(b1:b10,"x",a1:a10)

hi!

take a look at this!
F6 thru H6 is data validation of task.
F2:F4=gardening
g2:g4=walking
g2:g4=jumping
Book1
ABCDEFGH
2BobGardening8Bob844
3TomWalking5Tom750
4BobWalking4tRevor002
5TrevorJumping2
6BobJumping4gardeningwalkingjumping
7TomGardening7Bob16
8bobGardening0Tom12
9tRevor2
10
Sheet2

you can click any combination of F6 thru H6 and the sum of
those combination will br shown rigth after names

Replies
0
Views
111
Replies
5
Views
351
Replies
8
Views
927
Replies
6
Views
215
Replies
4
Views
349

1,219,808
Messages
6,150,351
Members
450,952
Latest member
Zung

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back