Subsequent Duplicate Records
I have a single-column list. The column header is 'ID'... records within this column repeat sometimes (this is ok). I need a worksheet function that will allow me to mark the second, third, or fourth duplicate, but leave the first duplicate alone or unmarked. I have searched the Web and this forum, and came up empty. If this cannot be done with a worksheet function, then VBA is welcome. No ColorIndex.
View Complete Thread with Replies
Related Forum Messages:
Delete Duplicate Records
I have a spreadsheet with a column of records (text ) from B1:B4000. I would like to delete the entire row of the duplicate record. Overall data set range is (A1:I4000). This spreadsheet may contain more than 1 duplicate record. Is there in easy fix?
Delete Of Duplicate Records
I'm having trouble getting this piece of macro to work. I want to delete duplicate Id records in (Cell B12 : B124), but only those with "No" in the (Cell Z12 : Z124) will be deleted.
Sumif Without Duplicate Records
In Column A, is gender: male/female
In Column B, is name: Bob, Jon, Mary, etc
In Column C, is salary: $40, $30, $20, etc.
In column B, there will be instances where a name might appear more than once. I want to be able to do a sumif formula of Column A and Column C, but not include any records where a name in column B is listed more than once. Is there a way to do this?
1 Male Bob $50
2 Female Jane $30
3 Female Kate $20
4 Male Mike $30
5 Male Bob $50
So if I wanted to sum all male salaries above, it would be $80, not $130.
Deleting Duplicate Records (both)
I have 2 columns A and B.
There are 1000 records in column A and 500 records in column B.
I would like to compare both columns for duplicate entries and deleting all instances of those record in both columns, leaving behind records that were not duplicated to begin with in their respective columns.
Eliminate Duplicate Records
I have a spreadsheet with 2 columns of about 2900 records. about half of the records are duplicates. How can I eliminate the duplicate records?
ID / ID#
Duplicate Check On Export Of Records
I have a spreadsheet that will export records when I "click" a button, to a spreadsheet on a network drive.
I would like to attach some code that will check to see if a duplicate record is going to be written to the network drive, and if so, alert the user that they are about to create a duplicate . If it is a duplicate, give the user the option to overwrite the existing record.
Ex. I export the results for account 12345.....Account 12345 is now written to an outside sheet.
User2 logs in and works with customer 12345, w/out knowing that someone has already worked with this account, presses the export button.....This is the trigger point for what I want to happen. At this point when it locates a dupe in the outside spreadsheet it will prompt the user too make some chouces .
find attached the code I would like to attach this to...
HTML option Explicit
Sub TransferData(Optional Dummy As Long)
Dim Row As Long
Dim TargetRow As Long
Dim Path As String
Dim Prompt As String
Dim Title As String
Dim Cel As Range
Dim Wkb As Workbook
Application.DisplayAlerts = False
Application.EnableEvents = False
Application.ScreenUpdating = False
Set Cel = wsCustomers.Range("C:C").Find(What:=Range("C4").Value, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=True)
If Cel Is Nothing Then
Prompt = "There is no match for the Customer Number (" & Range("C4").Value & ")."
Title = "Process Aborted"
MsgBox Prompt, vbCritical, Title
Row = Cel.Row
Set Cel = wsSetup.Range("A:A").Find(What:=wsCustomers.Range("A" & Row).Value, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=True)
If Cel Is Nothing Then
Prompt = "There is no Workbook Path setup for this Region (" & wsCustomers.Range("A" & Row).Value & ")."
Title = "Process Aborted"
MsgBox Prompt, vbCritical, Title
Path = wsSetup.Range("B" & Cel.Row).Value
If Trim(Path) = "" Then
Prompt = "There is no Workbook Path setup for this Customer Number (" & Range("C4").Value & ")."
Title = "Process Aborted"
MsgBox Prompt, vbCritical, Title
On Error Resume Next
Set Wkb = Workbooks.Open(Filename:=Path, UpdateLinks:=False)
On Error GoTo 0
If Wkb Is Nothing Then
Prompt = "The workbook for this Customer Number (" & Range("C4").Value & ") could not be opened." & vbNewLine & vbNewLine & "Path: " & Path
Title = "Process Aborted"
MsgBox Prompt, vbCritical, Title
Finding Duplicate Records With Condition
Wondering if there is a way, script-wise or formula-wise that will look through a table and find duplicates but not just any duplicates, it has to match a certain criteria.
For example, I have a column for UPC and Vendor#. I have my table sorted by vendor (all 159 of them in one table) I want to find out whether a UPC appears more than once for a vendor.
UPC --- Vendor
Here, as you can see, UPC 11251 appeared more than once for vendor 135. Can this be done through conditional formatting ? or a script?
Combining Duplicate Records Data
In my sheet I have it search for duplicate records and give those records the same id. Is there anyway to combine data into one record. For example, I have a person with a value in column Points1, on another row a value in column Points2, and another row a value in column Points3. I want take those values from the duplicate records and put them all in one record. I've attached a sample.
Identifying And Deleting Duplicate Records In Different Sheets
I have to load the data in Sheet 3 but before I do that I have to make sure that any organisation name that already exist in either Sheet 1 or Sheet 2 should be removed from Sheet 3.
Sheet 1 has 226 Organisation Names
Sheet 2 has 62 Organisation Names
Sheet 3 has 664 Organisation Names
I do not know how to write a Macro, nor d o I know how to write code.
Can someone help with a formular or code? or is there another simple way to do it?
Merge Duplicate Records In Single Record
Through a query I extract data from an oracle database. This database creates a record for every unique Article_Batch_Pallet_Faultnumber combination. Through a filter macro I create a new format on a different worksheet which creates a record for every uniqe Article_Batch_Pallet combination. I need a searchfunction to get the faultnumbers in the same row.
Removing Duplicate Records From Customer List
I have a list of customers that contains duplicate records. These records ALSO include thier addresses WHICH may or may not be identical.
Example: Customer with LAST NAME in A1, FIRST NAME in B1 may be the same person as A2 and B2, however each record may have a different address in column C1 and C2 respectively.
I want to be able to filter out all duplicate customers based soley on the first and last name (data in columns A and B).
SUMIF: Find Out Duplicate Records In My Spreadsheet
Im trying to find out if there are any duplicate records in my spreadsheet. See look at the attached. Cell 6745 down is highlighted in green. I want to check this against all the cells above. need to write a formula so that it marks any products in the green section with duplicate (in column I) if they are in fact repeated.
Concatenating Data From Multiple Duplicate Records
I have an excel spreadsheet that should have one record for each artifact in a museum collection. The problem is that the museum has consolidated this information from several different sources into one spreadsheet and now there are many duplicate records. They want all the duplicate records removed so that there is just one record for each artifact, BUT there may be different pieces of information in each of the duplicate records. So I want to do the following:
- sort records based on Accession Number (column A)
- find duplicate Accession Number records
- determine which fields (columns) within a duplicate record are unique and concatenate those entries into one master record for each Accession Number
- delete the duplicate Accession Number records
In the attached sample sheet, for Accession Number 66-1-100, we have 6 duplicate records. In the columns, we have information which in some of the records is duplicated, in some it is unique and in some it is missing completely. The museum wants just one master record for each Accession Number and they want all the data from the duplicate records concatenated into one and all the duplicates and blanks discarded.
What I've done so far:............
Add Dates In Subsequent Worksheets
I am building simple worksheets that consist of weekly time sheets. In cell B7 is the week ending date for that week. When I copy the worksheet onto a new worksheet, I want B7 of the new worksheet to be the week ending date 7 days later.
COUNTIF To Validate A Subsequent Cell
Cell C10 contains 2 possible values, "CLIENTS" or "INDIRECT"
These are also the names of 2 dynamic named ranges
I am trying to use a COUNTIF to validate a subsequent cell, checking if the contents appear in the original list.
Checks to see if the value entered into D10 is within the dynamic named range, the name of which is entered into cell C10
Gives me a #Ref error
Macro To Replace Cells And Subsequent Rows
I have a list of values of sheet titled "exclusives" column B Row 2 to Row 250.
Hence, if any of these values are found in sheets "1", "2", "3" and "4" in column C (of each sheet) replace the existing value with "Brand".
In addition after this bit I then need it to look up every new "Brand" and for the eight columns preceding (after) the new value I need to be cleared (any entries in those columns in that specific row of the "Brand" value deleted).
Associate The Information In The Subsequent Cells To A Corresponding Sector
I have a spreadsheet that has "Branch" Information starting below the heading in Cell C6.
I want to associate the information in the subsequent cells to a corresponding Sector that will be populated in column B6 onwards.
If the cell Cx has IMTB in it, then cell Bx will be Ops.
There are 6 Main Sectors - (CS, CSM, DM, CBSA, OPS, SPP) that need to be populated into Column B based upon one of the multiple possible Branches that are in Column C. the branch will fall under any ONE of the Sectors.
Essentially, I need to run a loop through, while statement, or something that will generate a true or a false for the entire column and then populate the empty column.
Copy Range & Subsequent Copies To Be Linked To 1st
I want to copy a range of cells and paste them in two different locations and have the new cells relate in data using a command button. This button would be clicked an infinite amount of times to provide the amount of copies desired and to be pasted underneath the previous copy. Example:.............
Workbook Open Events Fires Once. Subsequent Opens Causes Error
I have a program that uses the Document Open event to display a custom form. This program is being used on about 50 computers for the past 8 years with no problems. One user has a problem now. They can open the program once and the code fires. But when the user tries to open the same file a second time, the "Microsoft Excel has encountered a problem and needs to close" dialog box is displayed. The document that is recovered has no vba modules and no code in the Document open event. I've uninstalled and reinstalled Office Professional. Shut down all firewalls.
Open Found Files & Copy / Paste Onto Subsequent Rows
I have a requirement to create a master spreadsheet using a macro to copy set cells from several other spreadsheets and paste them into the master one in a list for accounting purposes.
So far the macro reads in the spreadsheet filename(s) and copy/pastes the cells to the master one - I need to be able to paste the values onto subsequent rows for each input sheet which is where my problems lies. Currently the row just pasted in is overwritten over by the following one, I need to go to the next row down but am stuck on how to do it.
' EmployeeExp Macro
' Macro recorded 12/02/2008 by eugene.cross
Dim i As Integer
Dim f As String
I've attached an example master output sheet to show what I want to produce, albeit this has only one row!
Delete Duplicate Rows :: Duplicate Company Names
I have a spreadsheet with 3300 rows. In column A there is a list of company names and in column H there is a corresponding Sales Rep name.Column A has many duplicate company names. I would like to run a macro that will find the a company name and then delete all the rest of the rows that contain that same company name.
Attached is a sample of that spreadsheet.
Delete Duplicate Cells Or Rows With A Duplicate Cell
I feel as though I have spent enough time searching the previous posts to ask this question.
I have a 4 column sheet, column B has many cells with identical data. I want to delete all the rows that that have duplicate data in column B.
COLUMN A= Car Makers
COLUMN B= Models of cars
COLUMN C= color
COLUMN D= owner
I want to end up with rows that each contain unique info in COLUMN B.
Mark Duplicate Values :: Insert Word Duplicate Next To Row
I am using the following macro to insert the word "Duplicate" in the first blank column next to a duplicate row. My data is sorted by the first column. Data Example:
12345 a DUPLICATE
Here is the macro I am using and it does not work. It marks the first duplicate it finds then goes into an infinite loop. Any Idea where I went wrong?
x = ActiveCell.Row
y = x + 1
Do While Cells(x, 1).Value <> ""
Do While Cells(y, 1).Value <> ""
If (Cells(x, 1).Value = Cells(y, 1).Value) Then
Cells(y, 3).Formula = "Duplicate"
y = y + 1
x = x + 1
y = x + 1
Sum Duplicate Values Then Delete Duplicate Rows
I have 4 columns in my spreadsheet. I am trying to find any duplicates that may exist in Col A, sum values in Col D, then delete the entire row. So far my sheet before I run my vba code is this.
After my code is run, I need for my spreadsheet to look like this
VBA Code That Records The Changes
I have 2 workbooks Mater and Update. I have a VBA code that compare between the two files column by column and update the Master file according to the Update file ( the code below).
Now my user want to see in a separate worksheet ("changes") only the changes - Date and time of changes at column A , old value at column B and new value at column C ........
Matching Records With VBA
I have 2 worksheets. Sheet 1 has in column B a single ID number in every cell, Sheet 2 in column A can have multiple numbers in a cell (e.g. "55517 / 55518 /55519" written in one cell.)
For every row in Sheet 1, I need to find the ID in Sheet 2 and add in column C in Sheet 2 the corresponding cell value found in column E on Sheet 1.
By doing this formula, when I am in Sheet 1, I can already find the row number in Sheet 2, if it exists.
I suppose I can then move to the destination cell by using OFFSET.
This is all I have been able to figure out conceptually.
I think it makes more sense for this to be in VBA. Especially the 'writing part' I don't know how to do. After the OFFSET part, how do you tell Excel to write something to that cell?
Because several IDs from Sheet 1 can occur in Sheet 2, it would have to add like REPLACE at the end (ie. len(cell)) "+result", so they get summed if there are multiple finds.
I am also not sure the MATCH sentence above can be translated as a Macro, or whether it is even an efficient way.
And finally, it has to loop (repeat for every row in Sheet 1), which must require VBA.
Look Up For Matching Records
i have cell N1 witch is a number example "8832"
cell O1 is text example "state street"
now i have A1 thur A10 as an address "number"
now E1 thur E10 is street address "text"
i need to take n1 match it to A1-A10
then take that row number and see if E1 of that row numbers matches
O1 if it does that that row numer and get g of that number if not keep checking to i find a match
I am using Excel 2007.
I have a large spreadsheet and new data is added periodically.
I have several columns of data associated with a description & date.
The data associated with each description is unique to that day.
I want to archive the older desciption data after I add newer description data.
Column B = date of the data
Column E = description (phrase)
How do I remove duplicate older rows of description data from my main spreadsheet (keep the newest descriptions rows) and save the older rows of data in a archive sheet?
My sheet has many columns from A to BU.
I have about 220,000 records with many duplicate Descriptions in column E. Each Description record has a date in the Date column B.
Records are sorted by: Description A to Z
then by: Date Newest to Oldest.
Here is an example (not actual sheet):
I highlighted the duplicate Description records in these examples that I want to update and archive.
I want to delete the older Description records from my main sheet so that only the duplicate Description records with the newest date remains like the example below.
And the older duplicate records that are removed from the main sheet I would like to save to a new sheet so that I can save a history of the Description records.
Combining Records Together
I have a problem in excel that is very urgent to resolve. I have a table that contains duplicate records e.g two people living at same address. I want to merge those records whose address field value is same. Find attached an excel sheet that contains the exact data and the exact output that I want. I know it requires VBA coding.
To Count Records If Value = 1 Or 2
creating a formula to count the number of rows in a different worksheet if a cell has a value of "1" or "2" (these are the only two allowed values) AND a status of "'on track". also need to add values in other cells within the different worksheet if the value is "1" or "2" AND has a status of "on Track".
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:
Matching Records In Two Workbooks
In Excel 2003, I need a macro to do the following:
For each record in column F (starting at row 2) (workbook: CATS LITTERS LISTS AS AT 01 FEB 10.xls) (worksheet: RAKE)
Find a matching record in another open workbook (workbook: DOG TRAINING v 3.xls) that has multiple worksheets as
Extracting Records Without Duplication
i am having data in ColA & ColB in both Sheet1 & Sheet2
1) some records are both in Sheet1 & Sheet2
2) in Sheet1 itself some records are duplicated
3) in Sheet2 itself some records are duplicated
what i want is to extract the all the records in Sheet1 & Sheet2 in Sheet3
without duplication of records..!
Delete Records From Spreadsheet
I have some data that looks like this.
What I would like to do is delete all numbers including those with duplicates that have a date of 2004 or sooner. In otherwords, anything from 12/31/2003 and later I want to keep, but anything from 01/01/2004 until the present.
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.
How Many Records To Sort Without Crashes
I have a column of data that is an 850,000+ list of phone numbers. I need to peridoically insert another 10,000+ at a time and see if there are duplicates. Using conditional formatting to highlight the duplicates with a colored cell, and then sorting those records to the top is what I want to do, but it's too much for Excel to handle, and it hangs. It looks like I need to break up the 850k records into smaller chunks. Anyone know what an average pc with Excel 07 can handle? It's a 2.8ghz w/2gb ram.
Selecting Max Value From Multiple Records
I need to select the record that has the highest number in column C by using an input value like (red).
desired Result : red, gt3, 100
Is it some variation of the MAX function?
VBA To Consolidate Activity Records
I run an activity group wherby members have to complete various events such as swimming, cycling, climbing etc..
I have a worksheet that comprises of columns A - P
Column A = Members Name
Column B = Address Info
Columns C - P equals the activities
As each member completes an activity a marker (the word "DONE") is placed in the relevant column C - P
This results in several records being created for each member with a single entry in one of the columns C - P.
I want to consolidate the data into a single row showing the activities completed for each member
The data is sorted by column A brining all like records together
So if the name in the current row = the name in previous row then move entries in columns C - P up one row then delete the current row.
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.
Count Of Records With Filter
I have a challenge when using autofilter.
In the attached file I have sales reps with sales numbers.
I found out from Ozgrid to use subtotal formule in C2 to sum only lines visible. Ozgrid, thx a lot for that input.
However, in cell C3 I want to count number of records, but when filtering sales rep "A", then formula "counta" still counts all records, i.e. 27.
What formula should I use to count only visible records, e.g. 7 records for sales rep "A"?
Separating The Records Depending On The Value
I have attached 2 spreadsheet :-
I need to excute the macro from master file asking the input file. Input file will be the Mails spreadsheet. In the master spreadsheet there will be "TAG" column, depending on value it need to check the value in the Mails spreadsheet "MessageContent" column after subject value. It need to group all tAG value, each sheet need to be created with TAG value and related need to be copied from "BounceBack" sheet to created sheet.
Step 1 :- Macro is executed from "BounceBackMaster.xls" and asked for input file, input file will be "BouncebackMails.xls"
Step 2 :- From "BounceBackMaster.xls", First TAG value will be readed " Monthly Account Statement" is check in "BouncebackMails.xls"........
Filter & Move Records
I have a spreadsheet with two sheets. One with car sales on and 1 with cars that have been sold on.
In the sheet that contains cars if a car has been sold i type sold in the price field and move it to the sold sheet. This is done by cut and paste. This is very time consuming as you can imagine.
Is there a way i can create some sort of if function that when i click a button searches for all records that have the word sold in it and moves it to the correct sheet?
Recurring Formula For New Records
I have an Excel table. Each row is a separate record. The user types in new records at the end of the table. One of the columns in the table contains a formula. Ideally the formula should apply for each cell in the entire column. Since I don't know how long the table will end up being, I simply ask that the user drag the formula down from the cell above. I do not want the user to accidentally change the formula though. At first I thought a Custom validation with a secret word that the user is unlikely to type in, would keep the user from changing the formula already in the cell. However, I can't stop the user from deleting the formula, which doesn't help. I then thought maybe locking (protecting with password) the column would do the trick. However, now the user can't drag down the formula from the cell above. I would therefor like help with one of 2 options:
1- have the formula apply to the cell automatically as a new record is created (ideal)
2- find a way to protect the cell so that the user can copy the formula down, but not change or delete it
I did find the following code online, which appears to go some ways to answer my first option, though I can't figure out why it only works if the formula is in column A (i.e. I have formulas in columns A, B, K, L, and AF to DL).
Selecting Specific Records
I'm trying to find the best solution for this problem. I have an excel sheet that contains over 2,000 rows of data with 8 columns. In this sheet, I need to be able to select entire rows that look for specific names in column E which is titled "originator".
The name format looks like this:
Selzer, Paul (TEM)
Wathen, Charles (TEM)
Chapman, Steven (TEM)
I have a total of 15 names that I need excel to look for in this entire sheet. What are my best options for this? I tried conditional formatting, but that does not work that well, as I would have to manually enter in each name.
Count Aging Records
I run a work order report on a daily and weekly basis and I am looking for a formula that will find all dates in L:L that are greater than 9 days old. I can't seem to work out the syntax. The cells in L:L are formatted as DATE and TYPE *3/14/2001