Matching and summing matches to distinct values for multiple rows over multiple columns with blanks

tholder00

New Member
Joined
Jul 24, 2019
Messages
5
My data has multiple pairs of a "name column" and "hour column" that corresponds to third value in another "movie column." The names aren't always the same in each column and can sometimes be blank or repeat. I'm trying to match and sum across all of these columns. The end goal is to have a what is shown in the picture below. I've tried to handle this through a pivot table and through index match but can't get the whole thing to come together. Thanks in advance!

YlO0YnB.png
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi & welcome to MrExcel
How abut
=SUMPRODUCT(($B$2:$F$4=$A8)*($A$2:$A$4=B$7),$C$2:$G$4)
 
Upvote 0
The data is more complicated than I originally posted. There's another level to split everything out on a weekly basis. Here's an example of what the raw data looks like and how the final data needs to be organized. In a way, if the three staff/hours columns could be stacked a pivot table could probably handle this. The data is coming from an online source so I'd like to avoid any manual manipulation and have it all done through formulas/pivot tables that I setup. Thanks in advance!

9RprzSQ.png
 
Upvote 0
How about

Book1
ABCDEFGH
1MovieS1hs2hs3h
201/01/2000Adaffy1minnie2pluto3
308/01/2000Bmickey1mickey3
416/01/2000Cpluto1daffy2mickey3
501/01/2000Bdaffy1minnie2pluto3
608/01/2000Cmickey1mickey3
7
8
9
1001/01/200008/01/200016/01/2000
11daffyA100
12daffyB100
13daffyC002
14mickeyA000
15mickeyB040
16mickeyC043
17PlutoA300
18PlutoB300
19PlutoC001
20minnieA200
21minnieB200
22minnieC000
Log
Cell Formulas
RangeFormula
C11=SUMPRODUCT(($C$2:$G$6=$A11)*($B$2:$B$6=$B11)*($A$2:$A$6=C$10),$D$2:$H$6)
 
Upvote 0
Okay that is great! Is there a method to automatically create the list of characters and movies (A11:B22)? As more data is added, more characters and movies will be added too.
 
Upvote 0
Probably, but that's beyond my meager skills with formulae.
 
Upvote 0
In A11:

Code:
=IFERROR(IF(OR(A10=[COLOR=#ff0000]""[/COLOR],COUNTIF(A$10:A10,A10)=SUMPRODUCT(($B$2:$B$9<>"")/COUNTIF($B$2:$B$9,$B$2:$B$9&""))),INDIRECT(TEXT(SMALL(IF(ISERROR($C$2:$G$9+0),IF(COUNTIF($A$10:$A10,$C$2:$G$9)=0,ROW($C$2:$G$9)*1000+COLUMN($C$2:$G$9))),1),"R000C000"),0),A10),"")
confirmed with Control+Shift+Enter. This assumes that A10 is empty. If there's a heading there, just put it in the red quotes.

In B11:
Code:
=IF(A11="","",INDEX($B$2:$B$9,SMALL(IF($B$2:$B$9<>"",IF(MATCH($B$2:$B$9,$B$2:$B$9,0)=ROW($B$2:$B$9)-ROW($B$2)+1,ROW($B$2:$B$9)-ROW($B$2)+1)),COUNTIF($A$11:$A11,A11))))
Also with Control+Shift+Enter.

These are pretty intensive formulas, so I don't know how well they'll perform with a lot of data.
 
Upvote 0
Thank you very much, this did work! It does start to bog down, like you thought. Would there be anyway to handle all of this through a pivot table? It seems like there should be a way to, but I just can't figure it out.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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