Complex Lookup and Sum

dwgnome

Active Member
Joined
Dec 18, 2005
Messages
441
Looking to tally scores based on name and category. However the original table layout is unconventional (Excel speaking) and I cannot change the output that comes from a webpage query. I want to sum the scores across all tabs (month) first by category (ie., CB, PB, CI, CM etc) and then by name within that category as grouped and shown below. I am using Excel 2003.

2012 Total Points by Category

*
BF
BG
BH
BI
BJ
Sheet
*
*
Sheet
*
*
*
*
*
*
*
*
*
PB
*
PB
Rich Little
*
Mitch Dunlap
Charlie Brown
*
Mia Farrow
*
*
*
*
CA
*
CA
*
*
*
*
*
*
*
*
*
CM
*
CM
*
*
*

<tbody>
[TD="bgcolor: #CACACA, align: center"]1
[/TD]

[TD="bgcolor: #CACACA, align: center"]2
[/TD]
[TD="align: left"]Jan 12
[/TD]

[TD="align: left"]Feb 12
[/TD]

[TD="bgcolor: #CACACA, align: center"]3
[/TD]

[TD="bgcolor: #CACACA, align: center"]4
[/TD]

[TD="align: center"]Total
[/TD]

[TD="align: center"]Total
[/TD]

[TD="bgcolor: #CACACA, align: center"]5
[/TD]

[TD="align: center"]6
[/TD]

[TD="align: center"]7
[/TD]

[TD="bgcolor: #CACACA, align: center"]6
[/TD]

[TD="align: center"]4
[/TD]

[TD="align: center"]3
[/TD]

[TD="bgcolor: #CACACA, align: center"]7
[/TD]
[TD="align: left"]Andrew Jackson
[/TD]
[TD="align: center"]5
[/TD]

[TD="align: left"]Rich Little
[/TD]
[TD="align: center"]2
[/TD]

[TD="bgcolor: #CACACA, align: center"]8
[/TD]

[TD="align: center"]*
[/TD]

[TD="align: center"]*
[/TD]

[TD="bgcolor: #CACACA, align: center"]9
[/TD]

[TD="align: center"]*
[/TD]

[TD="align: center"]*
[/TD]

[TD="bgcolor: #CACACA, align: center"]10
[/TD]
[TD="align: left"]Mia Farrow
[/TD]
[TD="align: center"]7
[/TD]

[TD="align: left"]Beth Kahn
[/TD]
[TD="align: center"]5
[/TD]

[TD="bgcolor: #CACACA, align: center"]11
[/TD]
[TD="align: left"]Charlie Brown
[/TD]
[TD="align: center"]6
[/TD]

[TD="align: left"]David Spade
[/TD]
[TD="align: center"]5
[/TD]

[TD="bgcolor: #CACACA, align: center"]12
[/TD]
[TD="align: left"]Charlie Brown
[/TD]
[TD="align: center"]2
[/TD]

[TD="align: left"]Wil Hurt
[/TD]
[TD="align: center"]4
[/TD]

[TD="bgcolor: #CACACA, align: center"]13
[/TD]
[TD="align: left"]Beth Kahn
[/TD]
[TD="align: center"]3
[/TD]

[TD="align: left"]Beth Kahn
[/TD]
[TD="align: center"]2
[/TD]

[TD="bgcolor: #CACACA, align: center"]14
[/TD]

[TD="bgcolor: #CACACA, align: center"]15
[/TD]

[TD="align: center"]*
[/TD]

[TD="align: center"]*
[/TD]

[TD="bgcolor: #CACACA, align: center"]16
[/TD]
[TD="align: left"]Mitch Dunlap
[/TD]
[TD="align: center"]7
[/TD]

[TD="align: left"]Tatum Oneil
[/TD]
[TD="align: center"]9
[/TD]

[TD="bgcolor: #CACACA, align: center"]17
[/TD]
[TD="align: left"]Andrew Jackson
[/TD]
[TD="align: center"]6
[/TD]

[TD="align: left"]Tatum Oneil
[/TD]
[TD="align: center"]4
[/TD]

[TD="bgcolor: #CACACA, align: center"]18
[/TD]
[TD="align: left"]Steve Segal
[/TD]
[TD="align: center"]7
[/TD]

[TD="align: left"]Rich Little
[/TD]
[TD="align: center"]2
[/TD]

</tbody>


Note that the number and type of categories are different each month.
The results should look like the following table. I added the numbers for emphasis that it should be summing.

2012 Total Points by Category

*
B
D
E
F
G
H
I
J
K
Summary Competition (Results)
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*

<tbody>
[TD="bgcolor: #CACACA, align: center"]26
[/TD]

[TD="bgcolor: #CACACA, align: center"]27
[/TD]
[TD="bgcolor: #FFFF99"]*
[/TD]
[TD="bgcolor: #CCFFCC"]Creative
[/TD]
[TD="bgcolor: #CCFFCC"]*
[/TD]
[TD="bgcolor: #CCFFCC"]*
[/TD]
[TD="bgcolor: #CCFFCC"]*
[/TD]
[TD="bgcolor: #CCFFCC"]Pictorial
[/TD]
[TD="bgcolor: #CCFFCC"]*
[/TD]
[TD="bgcolor: #CCFFCC"]*
[/TD]
[TD="bgcolor: #CCFFCC"]*
[/TD]

[TD="bgcolor: #CACACA, align: center"]28
[/TD]
[TD="bgcolor: #FFFF99, align: center"]Name
[/TD]
[TD="bgcolor: #CCFFCC, align: center"]CB
[/TD]
[TD="bgcolor: #CCFFCC, align: center"]CI
[/TD]
[TD="bgcolor: #CCFFCC, align: center"]CA
[/TD]
[TD="bgcolor: #CCFFCC, align: center"]CM
[/TD]
[TD="bgcolor: #CCFFCC, align: center"]PB
[/TD]
[TD="bgcolor: #CCFFCC, align: center"]PI
[/TD]
[TD="bgcolor: #CCFFCC, align: center"]PA
[/TD]
[TD="bgcolor: #CCFFCC, align: center"]PM
[/TD]

[TD="bgcolor: #CACACA, align: center"]29
[/TD]
[TD="align: left"]Tatum Oneil
[/TD]

[TD="align: center"]13
[/TD]

[TD="bgcolor: #CACACA, align: center"]30
[/TD]
[TD="align: left"]Wil Hurt
[/TD]

[TD="align: center"]4
[/TD]

[TD="bgcolor: #CACACA, align: center"]31
[/TD]
[TD="align: left"]Charlie Brown
[/TD]

[TD="align: center"]8
[/TD]

[TD="align: center"]4
[/TD]

[TD="bgcolor: #CACACA, align: center"]32
[/TD]
[TD="align: left"]Steve Segal
[/TD]

[TD="align: center"]7
[/TD]

[TD="bgcolor: #CACACA, align: center"]33
[/TD]
[TD="align: left"]Rich Little
[/TD]

[TD="align: center"]2
[/TD]
[TD="align: center"]8
[/TD]

[TD="bgcolor: #CACACA, align: center"]34
[/TD]
[TD="align: left"]Andrew Jackson
[/TD]

[TD="align: center"]6
[/TD]
[TD="align: center"]5
[/TD]

[TD="bgcolor: #CACACA, align: center"]35
[/TD]
[TD="align: left"]Mitch Dunlap
[/TD]

[TD="align: center"]7
[/TD]
[TD="align: center"]7
[/TD]

[TD="bgcolor: #CACACA, align: center"]36
[/TD]
[TD="align: left"]Mia Farrow
[/TD]

[TD="align: center"]7
[/TD]

[TD="align: center"]3
[/TD]

[TD="bgcolor: #CACACA, align: center"]37
[/TD]

[TD="bgcolor: #CACACA, align: center"]38
[/TD]
[TD="align: left"]David Spade
[/TD]

[TD="align: center"]5
[/TD]

[TD="bgcolor: #CACACA, align: center"]39
[/TD]
[TD="align: left"]Beth Kahn
[/TD]

[TD="align: center"]10
[/TD]

[TD="bgcolor: #CACACA, align: center"]40
[/TD]

</tbody>

Spreadsheet Formulas

Cell
Formula
G29
=9+4
F31
=6+2
H33
=6+2
F36
=7
F39
=3+5+2

<tbody>
</tbody>

<tbody>
</tbody>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4

I can only seem to query by name but cannot get around how to add referencing to the category.

Code:
=SUMPRODUCT(($BI$4:$BI$18=B$4)*1,$BJ$4:$BJ$18 )
or
Code:
=SUMIF(BI4:BI18,"Tatum Oneil",BJ4:BJ18)+SUMIF(BF4:BF18,"Tatum Oneil",BG4:BG18)

Any assistance would be appreciated.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I think it can be done with a pivot table.

But i can't copy the data you posted in my workbook to test it.

If you post it with excel-jeanie-html i can take a look for you.
 
Upvote 0
Oeldere, I prefer to use formula approach instead of pivot table. The data in the OP is from Excel-jeanie and I was able to copy back into Excel. Not sure why the blanks are turned into stars and the table lines disapear, but the data is essentially representative of my example.

Any help is appreciated.
 
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,928
Members
452,366
Latest member
TePunaBloke

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