ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Grouping (https://www.excelbanter.com/excel-discussion-misc-queries/38004-grouping.html)

stuart.young

Grouping
 

I have a monthly spreadsheet exported from an sql database, listing
invoice details.
Each row represents one line from an invoice my problem is I need to
group the rows by invoice number, however there are 2 added
complications, firstly, there is a second column that needs grouping
and a column which when grouped needs to be totalled e.g
A B C D

0035 12345 10 0
0035 12345 89 17.50
0001 12345 1 0

The above example is all 1 invoice number 12345, below is how the end
result should look, grouping by B and then A, totalling the grouped
columns of C and D

0035 12345 99 17.50
0001 12345 1 0
HELLLLLLLLLLLLLP!!!!!!!!!!!!!


--
stuart.young
------------------------------------------------------------------------
stuart.young's Profile: http://www.excelforum.com/member.php...o&userid=25765
View this thread: http://www.excelforum.com/showthread...hreadid=391741


Dave Peterson

It looks like either Data|Subtotals or data|pivottable would come very close to
what you want.

"stuart.young" wrote:

I have a monthly spreadsheet exported from an sql database, listing
invoice details.
Each row represents one line from an invoice my problem is I need to
group the rows by invoice number, however there are 2 added
complications, firstly, there is a second column that needs grouping
and a column which when grouped needs to be totalled e.g
A B C D

0035 12345 10 0
0035 12345 89 17.50
0001 12345 1 0

The above example is all 1 invoice number 12345, below is how the end
result should look, grouping by B and then A, totalling the grouped
columns of C and D

0035 12345 99 17.50
0001 12345 1 0
HELLLLLLLLLLLLLP!!!!!!!!!!!!!

--
stuart.young
------------------------------------------------------------------------
stuart.young's Profile: http://www.excelforum.com/member.php...o&userid=25765
View this thread: http://www.excelforum.com/showthread...hreadid=391741


--

Dave Peterson


All times are GMT +1. The time now is 05:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com