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:
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Chitosunday

Well-known Member
Joined
Jul 14, 2003
Messages
1,017
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)
 

SIXTH SENSE

Well-known Member
Joined
Oct 29, 2003
Messages
1,883
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
 

Watch MrExcel Video

Forum statistics

Threads
1,127,442
Messages
5,624,800
Members
416,054
Latest member
Ariel2219

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
Top