Solved

# grouping data in excel

Posted on 2014-09-10
120 Views
I’ve got a huge excel report full of data. 2 columns of interest that I need to filter, are invoice_num and amount_paid. Each invoice_num has a number of rows of data associated with it, but the amount_paid is then duplicated each time  dependant on the amount of lines of data associated with the invoice_num. I need a way to filter the data to only show the top line of data per “invoice_num” to get the figures down. Some example data below, you will see for example 4 rows of data for the invoice_num 67890. I need a way to filter that down to just the top row! There is also many other columns in between these 2 but they are the main ones.

12345          1612.46
67890          1929.39
67890          1929.39
67890          1929.39
67890          1929.39
99999            23.12
0
Question by:pma111

LVL 21

Expert Comment

ID: 40314176
Can you post an example workbook with maybe 20 lines of data that I can work off of.
0

LVL 32

Assisted Solution

Rob Henson earned 167 total points
ID: 40314195
You could create a pivot table to show the filtered data.

Drag the Invoice number as a Row field and use the Amount as a Data field but set to average or max or min rather than Sum. The Average or Max or Min will be the same as the individual amounts if they are all the same for each invoice.

Alternatively if you want to filter in place. Select the Data and run the Subtotal Routine to insert Subtotal rows. In this routine select the Invoice Number and again choose average or max or min for the invoice value.

The routine will add Grouping to the data so you can collapse to just the Subtotal rows.

Thanks
Rob H
0

LVL 6

Accepted Solution

johnb25 earned 167 total points
ID: 40314209
You could also create an advanced filter to another location, only pulling unique values for the header columns you need.
Attached is an example using your data above.

John
Filter.xlsb
0

LVL 35

Assisted Solution

[ fanpages ] earned 166 total points
ID: 40314219
Hi,

You can also use the "Advanced Filter" function & filter unique records in-place in the column containing "invoice_num".

See [Method 1] worksheet in the attached workbook.

Additionally, you could add a column [K] like I have within the [Method 2] worksheet, & filter on values = 1 based on the =COUNTIF(...) formula used within that column.
Q-28515299.xls
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.