Sumproduct, extract numbers from text

scorps10

New Member
Joined
Jun 16, 2014
Messages
5
Hi,

I receive an automatic dump of data on a weekly basis that looks like the below Table A. Basically, the first column is by category and the remaining columns are by week. How would I summarize the hours (found within the text) into Table B, which would summarize it by category (A,B,C) and Type (Submitted, Approval, Invoice, etc)? Any help would be highly appreciated.


Table A: Table B:
[TABLE="width: 901"]
<colgroup><col><col span="2"><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Category[/TD]
[TD]08-Jun-18[/TD]
[TD]15-Jun-18[/TD]
[TD][/TD]
[TD][/TD]
[TD]Submitted [/TD]
[TD]Approval[/TD]
[TD] Invoice[/TD]
[TD] Client [/TD]
[TD]Document[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Invoice (HRS : 383[/TD]
[TD]Invoice (HRS : 147.5[/TD]
[TD][/TD]
[TD]A[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Document (HRS : 36[/TD]
[TD]Document (HRS : 39[/TD]
[TD][/TD]
[TD]B[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Submitted (HRS : 53[/TD]
[TD]Submitted (HRS : 41[/TD]
[TD][/TD]
[TD]C[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Submitted (HRS : 9[/TD]
[TD]Submitted (HRS : 6.5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Submitted (HRS : 5[/TD]
[TD]Client (HRS : 54[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Submitted (HRS : 19[/TD]
[TD]Submitted (HRS : 18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Submitted (HRS : 3[/TD]
[TD]Submitted (HRS : 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Submitted (HRS : 2[/TD]
[TD]Submitted (HRS : 7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Invoice (HRS : 778.5[/TD]
[TD]Invoice (HRS : 446.5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Invoice (HRS : 747[/TD]
[TD]Invoice (HRS : 842[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Invoice (HRS : 936.5[/TD]
[TD]Approval (HRS : 8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Invoice (HRS : 982.5[/TD]
[TD]Invoice (HRS : 819.5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Invoice (HRS : 918[/TD]
[TD]Invoice (HRS : 1122[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Invoice (HRS : 58.5[/TD]
[TD]Invoice (HRS : 292[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Client (HRS : 528.5[/TD]
[TD]Client (HRS : 429.5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Approval (HRS : 4[/TD]
[TD]Approval (HRS : 8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
hi,

i have a way to achieve what you want.

You need to add 2 columns D and E
In D write de formula =A2&TRIM(MID(SUBSTITUTE(B2," ",REPT(" ",50)),1,50)) // this will create a key Category and type (Ex ADocument)
In Column E : =TRIM(MID(B2,FIND(":",B2)+1,LEN(B2)-FIND(":",B2)))+0 // this will give you the number of our - I use +0 at the end to change it from text to number

Then in your table B :
=SUMIF($D:$D,$F2&G$1,$E:$E)

You can drag and drop to the right and down
 
Upvote 0
My interpretation was that you wanted the whole table summarised, not just one column?

Formula in F2 is copied across and down.

Excel Workbook
ABCDEFGHIJ
1Category8-Jun-1815-Jun-18SubmittedApprovalInvoiceClientDocument
2AInvoice (HRS : 383Invoice (HRS : 147.5A088473.595875
3ADocument (HRS : 36Document (HRS : 39B9412000
4BSubmitted (HRS : 53Submitted (HRS : 41C71.500540
5CSubmitted (HRS : 9Submitted (HRS : 6.5
6CSubmitted (HRS : 5Client (HRS : 54
7CSubmitted (HRS : 19Submitted (HRS : 18
8CSubmitted (HRS : 3Submitted (HRS : 2
9CSubmitted (HRS : 2Submitted (HRS : 7
10AInvoice (HRS : 778.5Invoice (HRS : 446.5
11AInvoice (HRS : 747Invoice (HRS : 842
12AInvoice (HRS : 936.5Approval (HRS : 8
13AInvoice (HRS : 982.5Invoice (HRS : 819.5
14AInvoice (HRS : 918Invoice (HRS : 1122
15AInvoice (HRS : 58.5Invoice (HRS : 292
16AClient (HRS : 528.5Client (HRS : 429.5
17BApproval (HRS : 4Approval (HRS : 8
Sumproduct
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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