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.
Combine Multiple Rows Into One Row
I have a 8500 row sheet with 40 series of data given for each "data set". This data is situated in four columns and ten rows, so that rows 1-10 contain one data set, rows 11-20 contain another data set, etc...
Does anyone have a simple VBE script that can grab this data and format it so that my data sets are arranged as 850 rows and 40 columns instead of the native 8500 rows and 4 columns?
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.
Find Duplicates In Column & Combine Onto Same Row
I have a unique id in column A on a sheet with 20,000 contacts. I need a VBA script to loop through the worksheet and when it sees that there is a duplicate in column A, it needs to take the data from columns B, C, and D of that duplcate and copy them to the first blank cell at the end of the original record. Then it needs to delete the row that contained the duplicate that it just copied. I have searched and found parts of code that will do some of these, but I can't get anything to work, I don't know VB enough.
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.
Identify Row Number Based On Value In A Cell And Use That Row Number In A Macro
I have Sheet with 40 employees who each proposes their work schedule, so I have to give each Employee access to the same sheet and want highlight and unlock only those cells that specific employee can use.
Each employee has to login from a drop-down (sourced from Sheet.Employee Master), so their unique Employee Number is in "A13" of Sheet.LOGIN
Can I identify the ROW number and then use that ROW number in a macro to highlight and unlock specific Range of Cells in Sheet.PROPOSED SCHEDULE?
---where "Sheet.LOGIN("A13") = (the value in the cell Col A:"row" of Sheet.PROPOSED SCHEDULE)
I have attached a scaled down version of the Workbook.
Following code is scaled down-- this is for Employee 02 who appears on ROW 16 of the sheet. (macro is same for each employee, just uses a different row)
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?
Delete Row When Value In Column Is Unique
I have a worksheet called 'DR manager and deceased' which is part of a larger workbook. It contains around 20000 entries. There should be at least 2 rows for each entry, identified by the customer erefrence in column H, however a casting a quick eye down the data shows me that there are several entries where there is only one row for a specific customer reference and I need to identify these. I need a macro that will remove the entire row from this worksheet and copy it to the 'unique' worksheet if the value in column H for that row is unique, ie only found once in the whole of column H.
Copying A Row Based On Matching Unique Values
I have the following code which takes a unique value from 'sheet 1', and searches for the value in 'sheet 2'. If there is a matching value in sheet 2 it will copy the full row into sheet three.
I need to extend the code so that all values from 'sheet 1' are copied to 'sheet 3' even if there is no matching value in 'sheet 2'. If there is a matching value in 'sheet 2' however I need the entire row to be copied to 'sheet 3'
Dim c As Range, d As Range
For Each d In Worksheets("Sheet1").Range("A1:A500")
For Each c In Range("A1:A15")
If d = c Then
Worksheets("Sheet3").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
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:
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"........
Parsing A Row Of Multiple Items From A List Of Matching Unique
I have two worksheets: A and B.
Worksheet A:Contains 2 columns: Issue# (Col. A) and Program (Col. B).
Issue# contains a list of multiple issues. There are several instances in which the issue# is repeated.
Any particular Issue# field may have several issues in it, delimited by a comma.
Program is a program associated with the issue and this column also contains duplicates.
Worksheet B:Contains 1 column: Issue# (Col. A)
This is a unique list of issues#'s.
All Im looking to do is parse all Issue#'s from Worksheet B and have some way of knowing if that issue# is anywhere in Worksheet A. Most importantly, I need the "indicator" to be displayed on Worksheet A. This way I can see what program(s) is/are associated with the matching issues.
A couple other notes:All Issue#'s in Worksheet B are referenced at least once in the Worksheet A Issue# list
There are several issues in Worksheet A which are not referenced in the issue list on worksheet B (of which I dont care about)
I really hope that makes sense, but if not...
Here's the best example I could come up with: ....
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.
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.
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.
Count Unique Words Appearing In A Column Once Per Row
I would like to modify the below macro so it only counts a word once even if it appears more than once in a row. The reason I want to do this is so I can get a snapshot of the data without certain terms being over-represented.
For example, in the attached example the word 'Microsoft' appears 5 times in row 4 but I only want this to be counted once. In the whole data set Microsoft appears 20 times but only in 7 of the 20 rows so I would like the count to be 7.
The example is set out as follows: In column B there is a description field which in practice will contain consumer complaints and inquiries. To keep the data anonymous the description is filled out with random words and all other columns are blank. The output of Andy Pope's unique word counting macro appears in I:J.
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.
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...
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?
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+.