Solved

grouping data in excel

Posted on 2014-09-10
4
118 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
Comment Utility
Can you post an example workbook with maybe 20 lines of data that I can work off of.
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 167 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now