Solved

grouping data in excel

Posted on 2014-09-10
4
126 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 33

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Outlook Free & Paid Tools
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

861 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