Conditional sum based on user choice

IanC

New Member
Joined
Jan 21, 2004
Messages
12
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...

Name Task Hours
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!! :oops:
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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)
 
Upvote 0
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
1NameTaskHoursnamesgardeningwalkingjumping
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
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,446
Members
449,083
Latest member
Ava19

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top