Solved

grouping data in excel

Posted on 2014-09-10
4
123 Views
Last Modified: 2014-09-25
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
Comment
Question by:pma111
4 Comments
 
LVL 21

Expert Comment

by:Randy Poole
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

by:Rob Henson
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

by:
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

by:[ fanpages ]
[ 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
Advanced-Filter-in-place-Unique-records-
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Outlook Free & Paid Tools
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question