Delete Both Sets Of Duplicate Date?

Oct 8, 2008

I currently have about 3000 rows of data, much of it being duplicate data. Is there a way to have it search for duplicate data, and have it delete BOTH sets of duplicate data? For example, say this is what is in my spreadsheet:....

I would want it to delete both John Smith records and both Ted Nugent records, leaving Bob Bobbert's and Michael Jordan's records.

View 4 Replies


ADVERTISEMENT

Delete Duplicate Rows Containing The Oldest Date And Time Entries?

May 23, 2014

I have a UserForm which writes data to rows in a master spreadsheet. I'm attempting to write some vba code for a CommandButton in the master spreadsheet which can identify and delete duplicate entries based on "user ID", "Date", and "Time". I would like the CommandButton to retain the most recent entry from a user and delete all previous entries.

My master sheet is set out as such...
A, B, C, D,
UserID, Date, Time, Response

The users could potentially submit multiple entries on the same day. Ideally I would like to be able to click a CommandButton and delete each user's submission but retain their most recent one (based on "UserID", then "Date", then "Time").

I've searched all day for a solution and I've come close but I can not figure out a code that accounts for my three variables ("UserID", then "Date", then "Time").

View 5 Replies View Related

Duplicate Entries For Single Data Points Sets

Mar 6, 2007

I am using old macro code in excel written several years ago. I am trying to educate myself to update and improve the macros I am using but not making much progress. This macro is used to record data from a DDE link to a Data Acquisition System. The D-AQ system sends the data points to r5c3:r5c9 typically. The macro then records the data points in those cells to the next row in sequence on a specific time interval. However, the macro is recording duplicate entries for each set of data points. Sometimes just two, but has been as many as four duplicates. I have a remove duplicates macro to run, after the fact, but preventing them from occurring in the first place is the goal. I included the application.wait method at 10 second intervals after the application .OnTime method, but it isn't preventing the duplicates.

Dim delta_time As Date
Dim Count As Integer
Dim n_rows As Integer
Dim start_row As Integer
Dim col_mov As Integer

Sub initialize_button_set()
start_row = 7
Count = 0
n_rows = Worksheets("sheet1").Cells(1, 2).Value
delta_time = Worksheets("sheet1").Cells(2, 2).Value
Application.OnTime Now + delta_time, "get_data"
Rem Worksheets("sheet1").Buttons.Add 275, 0, 72, 36
Worksheets("sheet1").Buttons.Caption = "STOP"
Worksheets("sheet1").Buttons.OnAction = "Halt"
End Sub...........................

View 2 Replies View Related

Delete The Whole Row In All Sets Of Data

Dec 13, 2009

In the attached workbook, I have identical sets of data in column A separated by an blank cells. I need a macro for user form that searches for an item indicated in the textbox of the form and then delete the whole row in all sets of data.

It is important to keep the blank cells between the sets constant, 4 blank cells between each set, except the first set that starts with 3 blank cells.

View 2 Replies View Related

Macros To Delete Entire Duplicate Row For Duplicate Values?

Aug 19, 2014

I have a worksheet that has 3 duplicate values in a particular column, I need a macros that will highlight two of the duplicates row and then another macro to delete the entire row. The duplicate element are in column R. find attached worksheet.

Copy of OCL 2010 (3).xlsx‎

View 1 Replies View Related

Delete Duplicate Rows :: Duplicate Company Names

Dec 11, 2008

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.

View 5 Replies View Related

Delete Duplicate Cells Or Rows With A Duplicate Cell

Nov 1, 2007

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.

View 9 Replies View Related

Line Up 2 Sets Of Information And Delete Unneeded Lines?

May 15, 2014

I have 2 lists of codes with values tied to them, columns A & B, and columns C & D. Column A is a list of the codes in use, and column C is every code possible, I need to line up the codes and shorten column C to match column A, while retaining the value that is tied to each code so that I can compare Columns B & D easily.

View 2 Replies View Related

Sum Duplicate Values Then Delete Duplicate Rows

Jan 5, 2004

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.

Col A
100
101
102
105
100
101
102
105

Col D
5
4
2
4
1
2
3
1

After my code is run, I need for my spreadsheet to look like this

Col A
100
101
102
105

Col D
6
6
5
5

I have some code but I still need to do a considerable amount of tweaking to it. Currently my code is only deleting the duplicate values in Col A. I am having difficulty summing the values in Col D as well as deleting the entire row.

Here is my code thus far....

-------
Public Sub FindDuplicates()
For RwCnt = 1 To (Worksheets(1).Cells(65536, 1).End(xlUp).Row)
SrchValue = Worksheets(1).Cells(RwCnt, 1).Value
If Len(Trim(SrchValue)) > 0 Then
With Worksheets(1).Range("a1:a" & Cells(65536, 1).End(xlUp).Row)

[Code]....

View 9 Replies View Related

Sum Duplicate Values Then Delete Duplicate Rows

Jan 5, 2004

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.

Col A
100
101
102
105
100
101
102
105

Col D
5
4
2
4
1
2
3
1


After my code is run, I need for my spreadsheet to look like this
Col A
100.........................

View 9 Replies View Related

Multiple Date Sets Filter

Aug 21, 2014

I have six columns.

Column A: dates
Column B: data with relates to A

Column C: dates
Column D: data with relates to C

Column E: dates
Column F: data with relates to E

View 1 Replies View Related

Matching Two Sets Of Date And Displaying

May 8, 2012

I have two separate worksheets:

I'm trying to find a formula that looks at Column A on both sheets and if they match enter in column D of the referral sheet the month they were seen but only if its a 1st contact (appt type on column D of contact sheet)

ABCDReferralIDReferral Date409383316 January 2012 Month / year of referral Month of first contact
485955005 March 2012January 2012539372005 September 2011March 2012385048229 February 2012
September 2011483172202 December 2011February 2012944156617 January 2012December 2011
393039322 February 2012January 2012

ABCDContact IDcontact Datemonth / year of contactAppointment Type
539372026 January 2012January 20121ST385048205 March 2012March 20121ST944156616 December 2011
December 2011F/UP222944119 December 2011December 2011F/UP344055529 December 2011
December 2011F/UP539372010 September 2011September 20111st

View 8 Replies View Related

Compare 2 Sets Of Data According To Start And End Date Column?

May 26, 2014

In my attachment I am trying to identify rows within Table 2 that do not fit in with Table 1. For example in Table 2, Row 16 has a Start Date of 17.11.2010 and an End Date of 13.11.2011 for ID number 151. This record has to be shown as "OK" because it fits into the date range of Row 103 of Table 1 i.e. Table 1 Row 103 has a Start Date of 01.01.2010 and an End Date of 28.02.2013 for ID 15. In other words the Start Date of Table 2 Row 16 is GE the Start date of Table 1 Row 103, and the End Date of Table 2 Row 16 is LE the End Date of the same Row 103 of Table 1, therefore this reocrd is OK.

Row 14 of Table 2 needs to be shown as "NOT OK" because it has a Start Date of 12.01.2013 and an End Date of 31.03.2013 for ID 15 and this doesn't fit any date range of any Row in Table 1 for ID 15.

View 2 Replies View Related

Calculating Number Late Last Week From Multiple Dates / Date Sets

Jul 2, 2014

I am putting together a simple table to display current week's data vs previous weeks. The current week's data is drawn from a status chart which changes frequently. The constant change is fine for 'Current' as I only want the current data displayed.

The problem I am having is calculating the number of late jobs that existed during the previous week.

The status log has a due date which is compared to the current date to determine 'on time' status for the current week.
Due dates are reissued regularly so I can't use

=COUNTIF(RANGE,WEEKNUM(NOW()-1)) to return data about last week from my status chart.

I have available a 'Movement Log' (in the workbook but a separate worksheet) which tracks the changes in the due date field, but I'm not sure how to integrate that data to calculate the # of jobs that were running late from the last week.

My thought is that I need to perform a count of the # of late based on a comparison of 'due date' to 'date of the last day of last week' with a way to insert the "old due date" from the movement log to replace what is shown in the status log if necessary.

Movement Log.JPG

Status Chart.JPG

View 1 Replies View Related

Delete Duplicate Entries, Keep Last And Delete First

Feb 15, 2010

I found this sample code that works from top to bottom of a spreadsheet. But I need something that will delete the first entry and keep the last entry. My data is sent from one spreadsheet to a Master and sometimes the details can be sent twice, if the responsible person forgets to enter one line of production. The criteria should be the first 5 Columns of the sheet.

Sub Dupe_Killer()
Dim str As String
Dim str2 As String
Dim c As Integer
Dim i As Integer
Application. ScreenUpdating = False
Application.Calculation = xlCalculationManual
Sheets("SAMPLE").Select
rw = Cells(2, 1).End(xlDown).Row
'Sort Data by Date, Location & Number
Range(Cells(1, 1), Cells(1, 14)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Cells(1, 1), Order1:=xlAscending, Key2:=Cells(1, 2) _
, Order2:=xlAscending, Key3:=Cells(1, 3), Order3:=xlAscending, Header:= _
xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ ....................................

View 2 Replies View Related

To Insert Down Between Sets Then Border Sets

Apr 10, 2008

Below is a series of sets. Column A is the set number. I need a macro that will insert a row between sets and then put a border around each set. In my spreadsheet the sets are from A1:C500. Sometimes the sets are only 1 row, sometimes multiple rows. It looks like I will be doing one of these sheets every week. So far I have been doing it manually, but a macro sure would save some time.

View 13 Replies View Related

Delete Duplicate Value

Jan 27, 2007

i've got a range of data. Typically there are columns that have the same value running for a few hundred lines before it gets to the next value. What i'm trying to do is create a macro that when i select a value in a column i would run the macro and it would delete all the duplicate values until it reaches the next value but making sure it only deletes that value in that specific column.

View 3 Replies View Related

Delete Duplicate Records

Jul 15, 2009

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?

View 12 Replies View Related

Delete Duplicate Data ...

May 16, 2009

I'm a first timer here an I'm hving a problem with data. I have 3 sheets in a workbook, I want to transfer all the data to one sheet. I have 3 columns labelled Number, Name, & Sales, on each sheet some of the numbers and names are the same and I want to be able to match them up and put the sales from each sheet into a new column, so the final sheet will have 5 columns in total, if the numbers and names don"t match I just want to add those to the bottom of the matched ones.

View 10 Replies View Related

Sum, Merge, And Delete Duplicate Row

Sep 24, 2009

I've been trying to sum merge, and delete duplicate rows in this massive spreadsheet (over 15,000 rows). Currently I've gotten to the point where the duplicate lines are eliminated but the quantity is recording the number of times the line has moved, not summing. Below is an example of what I'm looking for

EX:..............

View 3 Replies View Related

Delete Of Duplicate Records

Nov 22, 2009

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.

Table
B12 Z12
-------------
E1 Yes
E2 Yes
E3 Yes
E4 Yes
E1 No
E2 No
E3 No
E4 No

Expected results:
E1 Yes
E2 Yes
E3 Yes
E4 Yes

View 13 Replies View Related

Delete All But Highest Value Duplicate?

Oct 1, 2011

I have 2 columns A & B. A has many duplicates and B has numerical values. I would like to delete all duplicates in A apart from the ones highest value in B?

View 9 Replies View Related

VBA To Delete Duplicate Rows?

Aug 18, 2012

VBA code that will delete all the rows where cell "C" is duplicated

I have look on the net and there is loads of complicated codes out there but I am looking for something fast.

View 2 Replies View Related

How To Delete Duplicate Rows

Jan 23, 2014

I am trying to delete duplicate rows and have had some success using a VBA from MR Excel threads. However, i would like to add multiple sheets to be compared. When i change the vba to use array, the next line fails with error 438, not a supported objectproperty method.....

Here is the code:

Sub CheckWest()
Dim LR As Long, i As Long
With Sheets("west")
LR = .Range("C" & Rows.Count).End(xlUp).Row
For i = LR To 1 Step -1
If IsNumeric(Application.Match(.Range("C" & i).Value, Sheets("Removals").Columns("C"), 0)) Then .Rows(i).Delete
Next i
End With
End Sub

This checks the sheet "removals" column "c", any duplicates found in sheet "west" column "c", row is deleted. I would like to add additional sheets, how to correctly change this line of the VBA?

With Sheets(array("west", "east", "north"))?? I beileive this is what i tried and the next line errored.

View 9 Replies View Related

How To :: Delete Duplicate Rows?

Mar 21, 2007

How would I go about deleting duplicate rows?

I've searched the board already and I couldn't find this.

I have a sheet with different data in each column, song titles, writers, owners and so on.

say this information runs from column A to H down 10,000 rows, occasionally information is duplicated in certain rows, except for column A.

I need to be able to search the sheet and delete any extra rows that are duplicated.

So I'll end up with the exact data in each row only appearing once.

View 9 Replies View Related

Delete Duplicate Values In A Row

Nov 27, 2007

I have a list of about 1,000 rows with multiple columns. Each row represents a unique person and the columns represent codes that were assigned to them. I have merged two sets of codes together to create this list, so some people (rows) may have duplicate codes. I would like to be able to delete all duplicate values from each individual person (row) so any given code only shows up once for a person.

View 9 Replies View Related

Add Up Duplicate Cells And Then Delete

Jan 8, 2008

I've searched the forums, and there are a lot of similar questions, but not quite what I'm looking for.

I have a large list of song titles, in one column. As an example, Song A is listed 4 times, Song B is 10 times, and Song C is 6 times.

Is it possible for Excel to go from this:

Song A
Song A
Song A
Song A
Song B
Song B
Song B
Song B
Song B
Song B
Song B
Song B
Song B
Song B
Song C
Song C
Song C
Song C
Song C
Song C

to this:

04-Song A
10-Song B
06-Song C

The numbers wouldn't necessarily have to be in the same cell, as long as I can sort the list from highest to lowest numbers while keeping the song titles matched with the correct number of instances.

View 9 Replies View Related

Delete Duplicate Row - But The Row Only Has The Subject That Is The Same

Dec 7, 2004

How can I create a macro for excel to delete rows that have the SAME subject? (delete all duplicates - the price etc on that row may differ but as long as the subject is the same, I was to delete it off)

View 4 Replies View Related

Delete Duplicate Ranges

Apr 24, 2007

I have thousands of questions & answers arranged in two consecutive columns as shown below (here for your convenience,: is the column separator). I want to delete all the duplicate Question and Answer sets keeping only one set. Sometimes questions may be same but answers differ as shown below. In this case I want to delete the colored/highlighted range.

Question: xyz
Correct Answer: abc
Question: def
Correct Answer: pqr
Question: xyz
Correct Answer: abc
Question: xyz
Correct Answer: asd

View 7 Replies View Related

Delete Duplicate Row (contiguous)

Jul 4, 2007

I know this gets asked a lot but I couldn't find a clear answer. And I know that most of the answers are to use advanced filter. In my case that won't work because I don't trust advanced filter. After doing it and double checking the results, two or three out of the hundreds of duplicates actually still show up. I couldn't believe it when it happened, but it did...I formatted the column to numbers, general, text, etc. and duplicates still show every now and then. It's strange...

Need vba code to search in one column, find contiguous duplicates, keep the first row, and delete the rest. Deleting the entire row that is. I think it's better to ask here for a quick response then me fooling around with it for who knows how long.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved