formula or function or what

sab_wow

New Member
Joined
Jun 8, 2018
Messages
5
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]name[/TD]
[TD]dept[/TD]
[TD]week 1[/TD]
[TD]week 2[/TD]
[TD]week 3[/TD]
[/TR]
[TR]
[TD]john[/TD]
[TD]a[/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]james[/TD]
[TD]a[/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]james[/TD]
[TD]b[/TD]
[TD]20[/TD]
[TD]-[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]queen[/TD]
[TD]b[/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]


imagine a much more larger data set with more names, weeks.
how do you identify the names that worked more than 30 hrs in any week?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
when certain names appear multiple times e.g james. how do you identify the names that appear multiple times as they work in the 2 departments and work over 30 hrs ?
 
Upvote 0
You need to un-pivot your data.
Then with a proper data-set you can get the sums you wish to evaluate in a Pivot Table and Filter by greater than...
 
Upvote 0
Do you mean you want something like this?

This is assuming James in department A and B are the same person?

[TABLE="width: 661"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]name[/TD]
[TD]dept[/TD]
[TD] New Column[/TD]
[TD]week 1[/TD]
[TD]week 2[/TD]
[TD]week 3[/TD]
[/TR]
[TR]
[TD]john[/TD]
[TD]a[/TD]
[TD] [/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]james[/TD]
[TD]a[/TD]
[TD]Worked more than 30 Hours[/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]james[/TD]
[TD]b[/TD]
[TD] [/TD]
[TD]20[/TD]
[TD]-[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]queen[/TD]
[TD]b[/TD]
[TD] [/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]30[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
You could use Conditional Formatting. Given the layout from post # 1, A1:E5, select A2:A5, click Conditional Formatting > New Rule > Use a formula > and enter:

=MAX(MMULT(TRANSPOSE(ROW($A$2:$A$5)^0),$C$2:$E$5*($A$2:$A$5=A2)))>30

click Format... and choose a fill color. You'll need to change the selection range as well as the ranges in the formula to match your sheet. You can extend the ranges both vertically and horizontally past your table to allow room for expansion. Or you can insert a row (or column) at the end, and the formula will adapt to include it.

I'm not sure how well this will scale. With larger ranges, it might start to bog down your sheet.
 
Upvote 0
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]name[/TD]
[TD]dept[/TD]
[TD]class[/TD]
[TD]week 1[/TD]
[TD]week 2[/TD]
[TD]week 3[/TD]
[/TR]
[TR]
[TD]james[/TD]
[TD]a[/TD]
[TD]1[/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]james[/TD]
[TD]b[/TD]
[TD]1[/TD]
[TD]20[/TD]
[TD]-[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]john[/TD]
[TD]a[/TD]
[TD]2[/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]25[/TD]
[/TR]
[TR]
[TD]queen[/TD]
[TD]b[/TD]
[TD]1[/TD]
[TD]30[/TD]
[TD]30[/TD]
[TD]30[/TD]
[/TR]
[TR]
[TD]kyrie[/TD]
[TD]a[/TD]
[TD]2[/TD]
[TD]20[/TD]
[TD]20[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]kyrie[/TD]
[TD]b[/TD]
[TD]2[/TD]
[TD]20[/TD]
[TD]10[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]klay[/TD]
[TD]b[/TD]
[TD]1[/TD]
[TD]30[/TD]
[TD]10[/TD]
[TD]20[/TD]
[/TR]
</tbody>[/TABLE]






The james is the same person. Multiple names appear in the data that are the same person e.g james, kyrie

identify those in class 1 that worked >30hrs in any week
identify those in class 2 that worked >40hrs in any week

so how do you identify those that worked >30 hrs and >40 hrs because taking only the first james" for example is not >30 but when you combine the 2 departments, its >30
?
 
Upvote 0
A simple way is to add the max helper column, set a pivot table with max as the value field, and filter by >30 or whatever you like:


Excel 2010
ABCDEFGHI
1namedeptweek 1week 2week 3MaxRow LabelsMax of Max
2johna10102525james90
3jamesa30303030queen30
4jamesb209090
5queenb30303030
Sheet12
Cell Formulas
RangeFormula
F2=MAX(C2:E2)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,715
Messages
6,174,064
Members
452,542
Latest member
Bricklin

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