Combine Multiple Records Onto 1 Row Based On Unique Number In Column
I searched and searched and I can't find an easy way to do this without using Access which I am rubbish at. Is there an easy way to do the following in Excel.
I have several thousand records by row each with a unique numerical identifier. The unique identifier is the "Household". Within the household there are sub "Accounts". The sub accounts are truely unique. All the "Accounts" are in the same column.
What I am trying to do is combine the records into one row per "Household" with the accounts listed in successive columns. The maximum number of accounts there may be is 7 but it can be as few as 1. Example:
HH Acct1 Acct2 Acct3 Acct4 Acct5 Acct6 Acct7
1 1234 2345 3456 4567
2 9876 8765 8765
4 5556 4447 3335
View Complete Thread with Replies
Related Forum Messages:
Extract Unique Records Based On 1 Column
I have a single excel data sheet with 10 rows of header information and then multiple rows and columns of data
I need to extract the 10 rows of header data plus the rows for each unique record in Col A into its own separate worksheet, with the work sheet name being the unique record from Col A
To further add to the challenge, the data in col A may have "/" in so will not comply with excel sheet naming convention so would like an error message to remind me to manually change a sheet name.
I attach an dummy data sheet just to show what I mean!
Get The Number Of Unique Records In A List
Here is a sample of data that I have:
code name lastname
How can I quickly get the total number of employees from a list like this one? the first field is a unique key (1 code per employee)
In this case, the desired result would be 6. (the count function does NOT give the desired result..)
Count Unique Records With Multiple Criteria With Formula
Count unique records in Column B where.
... Column H >=A1 and <=A2
... Column H <>"" and Column I <>"expired" and <>"" and Column I >=A1 and <=A2
... Column H <>"" and Column I ="expired" and Column H+120 >=A1 and <=A2
... Column H <>"" and Column I >=A1 and <=A2 and Column J =""
A1 - user defined (start) Date 1
A2 - user defined (end) Date 2
Column B - 6 digit number (or blank)
Column H - Date 3 (or blank)
Column I - Date 4 (or "expired" or blank)
Column J - Date 5 (or blank)
Count Unique Records With Criteria From Another Column
As the title says, I need to count the number of unique records (names) in column A, where column L is = to something specific (X,Y,Z,W, whatever) for some statistics im trying to report.
Please see the attached spreadsheet. For role X statistics, I need a count of the unique names from col A, where col L = X. Based on my sample spreadsheet, the number should be 2. For Role Y, it should be 3.
There is the potential for spaces in the rows, and no one will be 'cross role'
I've got a few different methods to just count unique values with specific criteria in the same column, but I just can't make anything work for specific criteria in another column.
Compare Multiple Sheets And Paste Unique Records In Seperate Sheet
I have 1 workbook, with 3 sheets. Sheet1 (EVER) has 3000+ rows and 12 columns of customer information. This sheet is for all customers who have ever placed an order. Sheet2 (06-07) has 1500+ rows and 12 columns of customer information. This sheet has all customers who have placed an order in the last 2 years. Sheet3 has 1 row, which consists of the column titles (12 columns) that are on Sheet1 and Sheet2.
I need to put all customers that are on Sheet1, but not on Sheet2 in Sheet3. I have tried VLookup; advanced Filter and a number of codes in the last 3 days and have not been able to figure this out.
Find Records Based On More Than One Column
I have a very large table that has a one to multiple relationship in a GIS. GIS doesnt support that type of relation ship. I need to find records that are related to the single key but have different values than the first record for that key.
Col 1 col 2 Col 3(key)
ab ab 1
bc bc 1
In this example, only the first row (ab) will be regarded in the GIS. so I need to pull out the second row and put it into another dbf based on the three columns so that I can then put it into the GIS so that the second row is considered and not ignored.
Combine Rows Based On Account Number/product No
I am curious if there is a way to combine the content of rows based on a change in account number(column A). The tricky part of it is that an account number could be in the file once and another could be in the data twelve times. The list is sorted by account number. I want to take the product code and description and keep placing in the combined row for each account number. Attached is a sample of the data.
Pull Found Records From Table Based On Single Column
I have the following data :-
COL A_______COL B________COL C
COL A_______COL B________COL C
I need to search data from range defined A1.C3 and if any data in that range found in the sheet 2 that having the same records.
Combine All The Records In The The Mentioned Sheets To The Master Sheet
For Each Ws In Sheets(Array("SHEET101", "SHEET102", "SHEET103", "SHEET104", "SHEET105", "SHEET106", "SHEET107", "SHEET108"))
Finalrow = .Range("A65536").End(xlUp).Row
Set CpyRng = .Range("A2", .Cells(Finalrow, "AR"))
If Finalrow > 1 Then
CpyRng.Copy Sheets("Master").Cells(Rows.Count, "A").End(xlUp)(2)
Basically what it does is simply combine all the records in the the mentioned sheets to the master sheet.
There is a little problem. When one of the sheets are on a filtered mode, the data copied in the "Master" sheet are only visible cells.
Un-filtering before copying is an option (i.e. putting the code ".ShowAllData") IF I can put the exact filtering back after copying. Reason being that the sheets are owned by other parties and they do not want their own filtering be removed.
Unique Number In Column
Need to find a way to flag the unique number in column with 641892
How To Count The Number Of Unique Values In A List, Based On Another Value
I need to count the unique values in a list based on another value. i.e.
AB ___ Jones
AB ___ Smith
BC ___ Henry
AB ___ Jones
BC ___ Brown
BC ___ Henry
AB ___ Tomkins
For all the AB's in column 1, I need a formula that will give me all the unique names from column 2, in this case 3. I've tried adapting:
but haven't been able to get it to work.
Counting Number Of Unique Items In Column
I am trying to count the number of unique items in a single column (~5,000 rows of data). For example, I may have the following data
a1 = apples
a2 = pears
a3 = oranges
a4 = apples
a5 = apples
a6 = apples
a7 = pears
in this case number of uniques items is 3
Right now I am using a Pivot Table to figure out the number of unique items but I am sure there is an easier way to do this.
Count The Number Of Unique Numbers In A Column?
I have a column where I have record numbers. The record number can end up duplicate in some cells.
I would like the get a formula that can count the number of unique numbers in that column?
I would like to get if possible to get a formula that summarize the number into a single cell.
Count The Number Of Unique Numbers In A Column
i'm currently trying to count the number of unique numbers in a Column using this formula:
So far so good.....But I want to add some conditions like only count the numbers that meet the condition say N1:N3000="SE*"
On this one I get #VALUE! and i can't figure out why.
I have also tried to put the AND/OR condition before the actual starting of the array of the SUMPRODUCT but nothing.
Lookup Unique Based On Multiple Conditions ...
I am looking for a solution other than using an advanced data filter for unique records only.
I would like to take a large list (columns A:D), and automatically filter for unique records and other conditions and paste the results in different tables (Group A & Group B).
Group A only includes records with value ="A" in the checksheet column.
Group B includes records with value <>"A" in the checksheet column.
Does anyone have any ideas how to do this so that when I paste the large list in columns A:D, the other tables (Group A & Group B) are automatically populated?
Unique Records Search
I have a formula for counting unique text records. However, is it possible to count unioque records based on certain conditions. For example, I have a stats sheet for a sports league and I want to count all the unique teams for dsivision 'North'. Coloumn A has the division, coloumn B has the team they played on that day.
I want to count all the unique records in column B, but based on those teams being in the 'North Division' (column A)
I want to do this with Excel, and not in VBA.
My formula for finding unique records is:
Calculate The Unique Records By Day
I have downloaded data to an excel spreadsheet by day and need to calculate the unique records by day. Then all the daily totals should equal the monthly total if I ran the same date range for the month by removing the duplicates to get the unique records.
Sequencing Unique Records
I am working on a data integration and have transactional data sets with multiple columns of data. In reviewing the data, I can see that based on values in 2 different columns, I can identify unique transaction records. The data is already sorder by transaction # and date. Creating a pivot table gives me back summary info for header records (I can get unique header records based on a concatenation of the trx # and Date), but I am having a difficulty obtaining uniqueness for the line items. The id that I created for purposes of header record summation means nothing from a user standpoint and I need to come up with more meaningful info.
What I have and what I want is...:
Tranaction#DateWhat I want is…15801911/23/2005015801911/23/2005015801911/23/2005015801911/22/2005115801911/22/2005115801911/22/2005115801911/22/2005115801911/22/2005115801912/12/2005215801912/12/20052
If I can get the data defined like that, then I can concatenate the trx# and the increment to block out the transactions into individual transactions.
Filter Out Unique Records
I have a very basic table of customers. In one column there is duplicate data. I guess in most cases an Excel user would only want to filter the table to show the unique records only. In my case I want to do it the opposite way round, to delete the unique records so I have multiple occurrences of strings that appear in that one column. I've used the "Conditional Formatting" trick, which is great = COUNTIF($G$1:$G$44000,G1)>1 highlights all of the strings that appear more than once. What I'd like to do from there though is to either just have that data, and to remove the unique records.
Either that, or.. is there some way to have a field/column which shows "True" or "False" if such a string has appeared more than once in a column. Auto Merged Post;I forgot to mention.. the reason I'd want a column of "True" and False" would be because then I'd have the ability to sort/group the data into all the recurring records and all the unique ones. I'd then be able to do away with the unique ones by just copying the recurring ones.
Sumproduct: Determine The Number Of Unique Names In Column
I have 1500+customer names in column C7 of table. I'm looking for a SUMPRODUCT formula that achieves the following 2 logical goals. First, it needs to determine the number of unique names in column C7. It can't just count the rows because many customers appear multiple times in the range. So, I have been using the following formula and it works great:
Second, I'd like the formula to tell me how many of the unique names in C7 correspond to public companies. Column C8 of my table indicates whether or not a company is public ("Yes") or private ("No"). So, I've been using the following formula and it seems to deliver the right result:
But the added COUNTIFS statement seems very unwieldy and indirect to me. Why do I have to examine every instance of a particular company's name when the answer could be determined by looking at any instance of the name -- after all, each company in C7 is either public or private, and has the same corresponding value in C8 (whether "Yes" or "No") everywhere that its name appears in C7!
So that's my first question: is there a clearer, more efficient way to achieve the same result? My second question has to do with toggling the public company test.
What if I create a special cell, say A1, that will always contain either the word "On" or "Off"........
Unique Records And Summing Quantites
Most of formulas I thoght of are only counting number of times it appears or comes back with the number of the unique records under one product.
I have two columns
In the first one I have product ID Numbers
In the second column I have Product quantities ....
Automatically Filter For Unique Records Only
I know how to use an Advanced Filter to sort for Unique Records Only and copy them to a new column, but I am looking for a way to do this automaticly everytime I update my worksheet.
I have a worksheet that populates an e-mail distribution list based on what you imput. Some e-mails are duplicates and I would like to eliminate them automatically before I Concatenate them into a single cell.
I imagine this could be easily done using VBA, but I am not firmiliar with writing any code so it is above my head.
Get Unique Records Using Advanced Filter From VBA
i need to use the advance filter=>unique records only feature from my macro... how would i do tat? i have 3 columns... column A has records which are repeated... column B and column C's values for a corresponding column A's value are the same...
A B C
a 3 6
b 4 7
c 8 9
d 1 2
a 3 6
b 4 7
.... and so on...
i need to use tat feature so tat i can filter column A alone and then copy column A, column B and column C's value to columns E,F and G...
ADVANCED: Extracting Unique Records
At the moment i am having great trouble taking two sets of records, comparing the two based on certain criteria and then extracting any records (rows) that do not appear twice, that is unique records.
So here it is:
I have two lists of sales.
1. our list from our point of sale system with order numbers and other details, entered by the sales agent.
2. the company that provides the products we sell for them sends us a list of these sales back to us from their end so we can see outcomes of these sales, that is the progress of the order, like cancelled, accepted, etc
The two lists need to be compared to see what sales are missing from either one..
so, I could colour the second list RED and the first list GREEN and add the second list underneath the first list (on the same sheet) and then sort by ORDER NUMBER, which would provide a red, green, red, green, red, etc pattern and i could easily identify sales that are unique, but there are so many thousands of sales this manual process is impossible.
IS THERE A WAY TO AUTOMATICALLY COMPARE THESE TWO LISTS BASED ON ORDER NUMBER AND SHOW ONLY THE RECORDS THAT ARE UNIQUE? THAT IS, GET RID OF SALES THAT APPEAR TWICE AND LEAVE ONLY RECORDS THAT I HAVE TO LOOK INTO WHY THEY ARENT ON BOTH SALES SHEETS...
Here is an example of the data i am using:
the numbers do NOT have the .. - or + next to them, thats just there to show you what list each is from.
so as you can see the order numbers with ".." next to them are reconciled, in that they have a partener record and do not need to be shown at all..
and the order numbers with "-" next to them are from our list
and the order numbers with "+" next to them are from THEIR list
i want to end up with a list like this:
Filtering For Unique Entries Based On One Column
This may be a basic question but I haven't been able to find the solution:
I'm using Excel 2003. I have a list with repetitive entries in one column and unique entries in the other columns. Example
I need to filter the list so that only unique entries in the first column show up, but I need the rest of the information to carry with it. Example:
I can't use the Avanced Filter > Unique Entries Only function because the information in the adjoining columns is not unique.
For Each Unique Value In Col A+B, Removing Lines Based On Column C
For each unique value of Order Number [col A] + Line Number [col B], I need a program which will locate the first instance of Next Stat [col D] = 530 and the first instance of col D = 540, deleting the other lines. The output will have two lines remaining for each unique col A+B combination, one where col D = 530 and another = 540. The data will always be sorted in date/time order prior to running this program. The actual data set has a varying number of lines, usually 1000+.
Sumproduct (count The Number Of Unique, Or Distinct, Company Names In Column)
I want to count the number of unique, or distinct, company names in column [C7], subject to two conditions that will exclude certain unique company names from the count.
I should also point out that most company names appear multiple times in column [C7].
a) Count the unique company names in column [C7]...
b) ...including only those companies who have at least one "Yes" in column [C8] somewhere among their records
c) ...and who also have at least one value equal or greater than "1" in column [C15] somewhere among their records
Note that that there is no requirement that the "Yes" and the "1" ever appear in the same record.
Count Unique Records In A Filtered Range
Is it possible to count the unique entries in a range based on the results of a filter that has been applied? I basically have a column with 2000+ cells that contain some matching values and I only want to count the unique entries. This will need to be a dynamic count as well as the filter criteria can and will change all the time.
Auto Updated - Filter Unique Records
A worksheet has a column named "Grade". There are may entries into this column, and most are used multiple times. I'd like a list in another location (to use in a list box on a user form) that contains all of the unique entries in the "Grade" column.
I know how to do the Advanced filter for unique records, but when I add different grades to the column, the filtered list does not update to reflect the addition. Do I need to run a macro to run the filter after every new entry?
Add Advance Filter Criteria For Unique Records
I have a folder which has 200 files. I have extracted data from these files based on autofilter criteria. But there are many duplicate records extracted for the criteria. I need only unique records . Below are the codes. Where to I add the criteria for search records:
'Note: This example use the function LastRow
Dim basebook As Workbook
Dim mybook As Workbook
Dim rng As Range
Dim rnum As Long
Dim mnum As Range
Dim FNames As String
Dim MyPath As String
Dim SaveDriveDir As String
Return Unique ID Based On Multi-Column Lookup
I'm looking for a formula (VBA I'm assuming) that will help me create a unique customer ID out of data that my website generates in order to import records into my accounting system.
I have a current list of customers in CSV format with the columns: CustomerID, CustomerName, CustomerZip
Each customer in our accounting system is assigned a unique,7 digit CustomerID in the format of XXX#### where XXX are the first 3 letters of their last name, and #### is a 4 digit number (with leading 0's) to create unique ID's for customer with the same first 3 characters of their last name. SAMPLE LIST:
SCH0001, Lindsey Schubert, 75230
SCH0002, Thomas Schoembs, 53132
ADA0001, Samantha Adams, 28205
What I'd like to do is pass the formula 3 parameters (Cust_First_Name, Cust_Last_Name, Zip) and have it parse the .CSV file and either return an existing customer's current ID or generate the appropriate new, unique ID, making sure in increase the 4 digit # accordingly and insert leading 0's if necessary.
Another caveat, if possible to work with, is the ability to also pass the formula another range of cells to append to the end of the .CSV file's data for comparison reasons. There are times when I'll bulk-import orders (or we receive numerous in the same batch) and the potential exists to have two customers that would have the same CustomerID created using JUST the .CSV data. Ie. If we use the example above and have new customers of Steve Schwab and Julie Schwitzer - we'd end up incorrectly assigning them both SCH0003, where if we'd read Steve Schwab's newly created info and customer ID of SCH0003, then Schwitzer would correctly be assigned SCH0004.
Add Auto Filter (unique Records) Option To Macro
I have been modifying a workbook and the original macro will send to the sheet Results once the "Search" button is clicked, but I have found that this macro is displaying duplicate records. Can anyone help me put in an auto filter to find only unique records? My second workaround option is if someone can help me remove the go to/select sheet option from the "Search" macro so that a user will not automatically be sent to the Results tab and will instead hit the "Confirm Category Selection" button (which auto filters before sending the user to the Results tab).
Remove Duplicates :: Advanced Filter, Unique Records Only
I'm having a problem deleting duplicates from list in excel. I’ve attached a sample. I’ve tried the following:
1-Advanced Filter, Unique Records Only
2-Remove Duplicates function in Excel 07.
4-Colour Conditional Formatting, sorting by colour
5-B2=IF(A2=A3,”Dup”,”Not-Dup”). The entire column returns “Not-Dup”
6-I’ve tried to resolve using the fix shg & teylyn suggested to Hillto in this thread, but am unable to get the ‘Numeric’ Keypad to appear in the ‘Find’ Function.
Compare Multiple Column Of Data And List Out Common And Unique Component In Adj Columns
I am trying to compare multiple column in a worksheet to find
common component in all the columns and what is unique to a particular
column only. And list the results/finding in adj column. What i am
trying to accomplish is something as below.
Sheet1 Sheet2 Sheet3
Column2 Column2 Column2
02-1234-12 07-1234-12 02-1234-12
04-1234-12 03-1234-12 02-1234-12
05-1234-12 02-1234-12 06-1234-34
Common to all Unique to sheet1 Unique to Sheet2
02-1234-12 05-1234-12 07-1234-12
Range Object/property: Calculates 2nd Column Based On 3rd Column's Number
I'm trying to write a code that calculates 2nd column based on 3rd column's number or vice versa based on the condition set on the 1st column. Below, there are two procedures. "SimpleCalc" and "SimpleCalc2". I first wrote SimpleCalc2, but it isn't working, so I worked around the error by writing SimpleCalc, which selects a cell and moves around by offset. I personally find it hard to read and error prone as I develop more logic around it.
I'm trying to develop more function based on this code, so I need to make it neat and flexible. what I'm doing wrong in SimpleCalc2? Or do you have any suggestion to improve the code "SimpleCalc"? I'm using Excel 2003.
Dim SimpleMethodRng, SimpleMethod As String, i As Integer
SimpleMethodRng = ActiveWorkbook.Worksheets("Dashboard").Range("N5:P12")
For i = 1 To 8
SimpleMethod = SimpleMethodRng(i, 1).........
Extract Certain Records Based From List Based On Date
In sheet1 I have the following
1. Names (Column A)
2. Date (Column B)
My current list if from A2:B300
I am trying to have a piece of code go through all the records in this list, if any of the dates are within the next 2 weeks (from now()) then copy this record (name, date) and put in sheet2. And loop through all 300 records or possibly additional records.
Combine Workbooks With Multiple Sheets Into 1 Multiple Sheet Workbook
I have about 20 workbooks with different file names for different projects all saved in the same folder. Each workbook has about 10 worksheets and each worksheet is named in a similar fashion in each of the 20 workbooks (eg. revenue, cost, variance etc.). I want to pull out a worksheet named ' forecast' from each workbook into a master workbook so that the master workbook would contain the 20 forecast worksheets.
Combine Multiple Sheets From Multiple Books Into One
I have 6 spreadsheets all within the same folder, these are pretty much identical (rows, colums, sheets within them) apart from the names of the files.
I then have a master spreadsheet within the same folder where I want to combine all the data, from all the sheets within each book (if that makes sense!) apart from the data on the last sheet within each book as this is the reference data, onto one sheet within this master file. If possible I only want to copy rows accross which have complete data too.
So: (names not correct)
From book1.xls copy all data on sheets (sheet1, sheet2 etc) except last sheet
From book2.xls copy all data on sheets (sheet1, sheet2 etc) except last sheet
combine onto masterfile.xls on sheet1.
I have searched on here and can only find how to do it with the first sheet in each workbook, not looping through all the sheets in each book. Please see below.