Summarizing report

Please see enclosed example. I am looking for a macro or other method to summarize the lines in the INPUT tab into the table on the OUTPUT tab. The original spreadsheet as 48,000 lines so no manual cut and pastes or copies. Any ideas welcome.

UPDATE: I solved the issue myself with one formula, which I was able to paste down the sheet once. Then I ran a pivot report and I was good to go. See enclosed spreadsheet col. J.

mockup.xlsx14.2 KB