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:
Category08-Jun-1815-Jun-18Submitted Approval Invoice Client Document
AInvoice (HRS : 383Invoice (HRS : 147.5A
ADocument (HRS : 36Document (HRS : 39B
BSubmitted (HRS : 53Submitted (HRS : 41C
CSubmitted (HRS : 9Submitted (HRS : 6.5
CSubmitted (HRS : 5Client (HRS : 54
CSubmitted (HRS : 19Submitted (HRS : 18
CSubmitted (HRS : 3Submitted (HRS : 2
CSubmitted (HRS : 2Submitted (HRS : 7
AInvoice (HRS : 778.5Invoice (HRS : 446.5
AInvoice (HRS : 747Invoice (HRS : 842
AInvoice (HRS : 936.5Approval (HRS : 8
AInvoice (HRS : 982.5Invoice (HRS : 819.5
AInvoice (HRS : 918Invoice (HRS : 1122
AInvoice (HRS : 58.5Invoice (HRS : 292
AClient (HRS : 528.5Client (HRS : 429.5
BApproval (HRS : 4Approval (HRS : 8

<colgroup><col><col span="2"><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 

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,

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,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

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