Removing Unwanted Duplicate Lines
Sep 16, 2009
Hi, I have a report that has multiple lines for the same job with notes of issues and solutions. Each line has a date assosiated with it.
What I need to do is to delete all of the notes apart from the first one. I have attached a sample of the data and highlighted the rows that need to be kept.
I have left the data in it's raw form as it is not always extracted in date order.
Can anyone help me out with a Macro that will sort the data and remove all rows apart from the earliest note per job number?
View 7 Replies
ADVERTISEMENT
Aug 19, 2009
I need some adv on how to remove lines that containing duplicate cells. My data is up the max lines of 65536.
I have data in column D that have duplicate value and I need to remove that duplicate line from the list ( thus leaving only unique value). Is there any macro that can do this?
View 9 Replies
View Related
Mar 22, 2013
I have a data sheet which I need to filter in some way with multiple criteria. For example
I have a sheet called Training which has 4000 rows of data. Column F is labelled Cost ID and under this column I have 400 different IDs of which I need to see data for 155 out of the 400.
Is there a simple way of removing the unwanted data?
View 5 Replies
View Related
Jul 9, 2009
I'm needing some code that will remove an open quotation mark from the numerical value found in column A. This will be for every row with a numercal value.
example problem: "360015
example answer: 360015
All numbers will be 6 digits
And I've got another issue with numerals in column C. To the left side of the Cell there maybe a Number or Letter. To The Right side of the cell
there will be a single or double digit number. Both will be separted by some space (6-8 spaces). As in the examples below:
(again what you see on each line is in one cell in col. C.
R 59
E 6
0 4
I need the value on the left side of the cell to be moved concenate/merge with the values in column B.
There's will be approx 2000 rows that will need to be checked for this occurrance. Since there's so many rows,
I'd really would like to use VBA and not formulas to accomplish this.
View 4 Replies
View Related
Sep 17, 2007
E122112 David Hall
Robert Townsend
Micheal Keel
Tanya Smith
Elizabeth Charles
E004587 Andrea Tummings
The problem is for those names that come thorugh with the Letter and than the number...I don't need the names like that....I would like a Macro that would look at each cell in column A and remove that from those selected cells. I would like my result to look like this...
David Hall
Robert Townsend
Micheal Keel
Tanya Smith
Elizabeth Charles
Andrea Tummings
View 9 Replies
View Related
Feb 25, 2007
I have an excel sheet with approx 30,000 rows of data.
These are all keyword phrases.
They can be related to any subject, but for this example these are related to the root keyword phrase of "car Rent"
I have some software which basically pulls in keyword phrases from search engines and meta tags etc, including misspelled keyword phrases.
My problem;
The data is uncleaned.
In other words there might be I think it's called "Carriage return" data in there, so the row of data might be very deep (Instead of a row height of say 10.5 it could be anything, IE some could be 100 or 200 even).
There are unwanted characters, for example; ()[]{}+?!""^*
(If it could delete all unwanted characters except for letters/digits)
There is a problem I see, that if it removes _ or - between words, that it will join the words together which won't be of any use. If it deletes anything with a letter either side of it or a letter and digit, or 2 digits, 1 either side it would then need to add a space to replace the hyphen.
So for example; if there was a phrase in the list like ....
View 9 Replies
View Related
Jun 21, 2006
Need to find out how I can restrict a worksheet to show only the columns and rows that I want. For example, I want to show columns A to H, and rows 1 to 25, and nothing else - I don't want there to be a column G, or a row 26, just blank grey space. I know it's possible, because I've seen it done : D . But the closest I can get to is: View > Page Break Preview, which isn't quite what I'm after.
View 2 Replies
View Related
Jan 19, 2010
After doing some searching I found a macro here which imports multiple text files into one workbook, keeping each text file as a seperate worksheet, each worksheet named the same as the original file name (minus the .txt extension).
However, it adds a blank line between each line of text. So I get this:
Pinging 172.27.133.29 with 32 bytes of data:
Reply from 172.27.133.29: bytes=32 time=232ms TTL=62
Reply from 172.27.133.29: bytes=32 time=62ms TTL=62
Reply from 172.27.133.29: bytes=32 time=65ms TTL=62
instead of this:........
Pinging 172.27.133.29 with 32 bytes of data:
Reply from 172.27.133.29: bytes=32 time=232ms TTL=62
Reply from 172.27.133.29: bytes=32 time=62ms TTL=62
Reply from 172.27.133.29: bytes=32 time=65ms TTL=62
This doesn't happen when I use the import wizard, or when I just open the file from the File -> Open menu.
My text files are always the same format (number of lines, etc.), so it's easy to delimit and insert forumlae as needed, but those extra lines are breaking a macro I've previously written to parse the data.
View 9 Replies
View Related
Jul 25, 2013
I have a spreadsheet which is used by users unfamiliar with Excel. They are using the filter to select records, however when this is used some records appear which have no entry in the cells of that column. Can I overcome this? There is no data in the blank cells, other than a data validation drop down.
View 1 Replies
View Related
Jul 25, 2014
I would like to add a piece to a macro that would delete lines that contain, in the column A, the letter A with a hyphen and a random number. Column A contains different information...I just want to delete the ones with "A-" followed by a number. Should I be able to use "A-*" in the formula?
Here is what I'm trying thus far...
Code:
For K = n To 2 Step -1
If Cells(K, 1).Value = "A-*" Then Cells(K, 1).EntireRow.Delete
Next K
Dim L As Integer, p As Double
p = Cells(Rows.Count, "A").End(xlUp).Row
View 5 Replies
View Related
Feb 17, 2010
I have a texfile that populates a textbox on a userform. I would like to remove all blank lines in the string including those at the end if they exist, before populating the textbox. I'm reading the entire file at once into the string, not line by line.
Is there any way to edit the string called Text to remove the blank lines before populating the textbox? I'm looking for 2 carriage return characters in a row, and if so then remove one of them, but I don't know how to code that. This is in the userform activate section. If I read the textfile line by line, I don't know how to populate the textbox that way and remove the blank lines.
View 3 Replies
View Related
Jan 21, 2010
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+.
View 4 Replies
View Related
Jan 1, 2008
i have a list of about 2,000 rows of text going down vertically, but out of that 2,000 there's only about 1,500 actual items - the rest are duplicates.
how would i go about eliminating the duplicate strings of text quickly?
View 9 Replies
View Related
Oct 22, 2009
How to get together all duplicate lines? ...
View 9 Replies
View Related
Aug 12, 2014
I merged about 15 adresslists from media contacts to one excel list. Each list had a name i.e. music, health, theater, etc. and the same logic in colums. I added a few columns and have 1 large list now.
As some journalists write about music & health & theater, architecture, etc. they are listed up to 10 times in the new list now. But the "genres" from the original list i.e. music, health, theater, etc. are in different columns. Some of the lines have empty fields (i.e. no address or mail)
All I want to do is have one line with all the information of all 10 lines in it, merged, dupes removed:
company - firstname - lastname - Adress - Mail, etc. : genre: music - health - theater:
example.xlsx
I atteched an example of the full list and the result i want
View 9 Replies
View Related
Jan 22, 2009
I would like to combine 3 string together but I would like to remove the duplicate found in any of the string. I attached an example with the desired result. I know =A1&""A2&""&A3 can combine the string, as I wan a space between each string. anyone can further edit my formula to remove the duplicate ...
View 13 Replies
View Related
Apr 14, 2013
Is there way, short of creating a macro, to have duplicate rows deleted in a spreadsheet?
View 3 Replies
View Related
Jul 24, 2009
I need to restructure a report that I have imported into Excel.
My columns are titled (from left to right):
Company Name, Account ID, Client Code, Billing Street, Contact Name, Contact Number
There are many rows per Company because every company has many contacts. As a result, for each company, the Company Name, Account ID, Client Code, etc. columns with their associated information in the fields underneath the heading are repeated unnecessarily.
How can I delete the extraneous fields of information (leaving one Company Name field filled out per company) without having to go in an manually deleting them (which would take hours)
View 9 Replies
View Related
Feb 11, 2009
I have a large spreadsheet of data, with various columns with different bank names, the amount (column H) each bank holds plus loads of other columns. Some of the banks are duplicated, so in a way I want to do an advanced filter to get rid off the duplicate lines, except that I need the amounts (column H) summed.
View 2 Replies
View Related
Apr 29, 2014
I am trying to setup a table for someone to track and schedule service hours on heavy machinery.
I have a table with columns for Make, Model/SN(which is the unique field in each row), date of last service, hours at last service, current hours and an hours since last service. Service needs to be done at 500 hours so I filter the table based on the hours since last service for >= 400 hours. That's fine, but it shows multiple lines per machine. Is there a way to use a custom filter to find duplicate values in the Model/SN column and then only show the row with the max date of last service?
I'm sure this would be a cinch with VBA, but I would like to find a way that if something changes later on after I am gone that he can still possibly figure out how to make it work.
View 1 Replies
View Related
Aug 15, 2008
Let's say I have two mailing lists, A and B.
A:
bob@bob.com
jeff@jeff.com
tom@tom.com
cindy@cindy.com
jose@jose.com
B:
fred@fred.com
jeff@jeff.com
angus@angus.com
cindy@cindy.com
chuck@chuck.com
Now I want to create list C, a modified version of list B, which is made up of everybody in list B, EXCEPT for those people who are also present in list A (in this case, Jeff and Cindy).
So basically list C should look like this:
C:
fred@fred.com
angus@angus.com
chuck@chuck.com
What would be the fastest and most efficient way to create list C?
View 7 Replies
View Related
Apr 2, 2013
I have a data set that I add information to weekly. I then add a value at the end of the row, example active or inactive. I've found that, when using the remove duplicate function, it does not always remove the second instance, resulting in a loss of that added data(active or inactive). So I guess my question is, can I somehow specify which instance of duplicated data is removed?
View 6 Replies
View Related
Oct 2, 2013
I have trying to remove duplicate value for two columns which are not in order since long time. I have listed an example for the purpose. Two rows contains same information in different columns. I just wanted to have one row and remove the other with same information.
AAAA
500135500136
500136500135
500137500138
500138500137
500191500192
500192500191
500277500278
500278500277
500413500414
500414500413
View 5 Replies
View Related
Feb 28, 2008
I have an excel spreadsheet with approximately 10000 rows. There are approximately 10 columns...
Column A - person's ID number
Column B - name
Column C - Street Address
Column D - City
Column E - State
etc...
It being such a large list there are many many duplicates (it was pulled from a bunch of different excel spreadsheets and combined into one via copy and pasting one document into the other).
I figured out a way to have excel highlight the duplicates in a different color... but scrolling through 10k people and deleting the duplicates is obviously very tedious (approx 40% of the spreadsheet is duplicates).
Is there a way to sort out the duplicates (via their ID number, column A) so that there are no repeats? I want to get rid of the 2nd/3rd/4th (etc) occurance of the person's information but I was to obviously keep the first occurance.
I tried using Advanced Filter but I must have done something wrong because it shrunk the list too far down.
View 9 Replies
View Related
Apr 22, 2007
I need to extract lines in a huge text file (more than 300,000 records ) based on one condition. for e.g.
02/03/07 123456789 hsjksk sjdlsl
05/03/07 323453789 hsjksk sjdlsl
04/03/07 123456789 hsjksk sjdlsl
02/03/07 123456789 hsjksk sjdlsl
I need extract of lines where the date and the digits are the same. in above example it should extract only record line 1 and record line 4. Some body advised me to try MSAccess , but I have never used MS Access and have no clue about it , hence i don't want to use it. Is there a way in VBA to code this ?
View 9 Replies
View Related
Aug 8, 2014
I have a column that is filled with various car brands that a dealership might sell. The data in the cell may look like CHRYSLER; CHRYSLER; CHRYSLER which I would want to just say CHRYSLER. If the cell says CHRYSLER; FORD; CHRYSLER; FORD I want it to just say CHRYSLER; FORD.
View 1 Replies
View Related
Oct 10, 2011
Currently trying to solve a niggling issue with removing duplicate row data from competition entry databases using the following code...
Code:
Sub remove_duplicates()
Dim lastrow As Long
Dim i As Long, j As Long
On Error GoTo errhandler
Columns("A:G").Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range("B2") _
[Code] ......
errhandler:
'MsgBox Err.Description
End Sub
What I need to happen is for duplicates to be based on both the name and email matching (columns A + B) and then remove all duplicate rows, whilst ignoring but preserving the content in columns C,D,E and F on those rows that remain. Column G contains either "Yes" or "No" depending on a users membership status. Sometimes duplicated data will contain identical name and email address but have different membership status in column G where someone was logged in when submitting a form the first time, and then logged out the next (potentially a mixture of the two over multiple times). Therefore I need any duplicate users who have different values in the G column throughout the database to be detected by the macro and we must ensure that the single row retained in the final non-duplicated list displays "Yes" in column G for that user.
Duplicate users who are always "yes" or always "no" work fine, its only the ones with mixed values for column G that need to be analysed and their return forced as Yes in the final list.
The final list should preserve the original column structure and thus be only one row per unique user.
The above code appeared to work the first time with a sample file, but when running the macro on one of my full size lists (3k - 5k rows) it returns 2 rows for each user who started off as a mixture of Yes/No... ?
Both rows will say yes in column G (so that part is correct!) but I have to re-run the macro again on the same dataset for it to remove the duplicate yes rows to get the list as it finally should be!
So I can achieve the result by running it twice, but this is a bit of a cheating way to do it and also the next stage after this involves something similar across multiple worksheets so I need something rock solid to build upon!
View 5 Replies
View Related
Mar 27, 2008
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).
View 9 Replies
View Related
Mar 11, 2009
I have a report with ~44,000 line items. From this report, I need assistance generating a report that lists all unique line items. I am having problems trying to identify which line items are duplicates as I need to compare 4 different cells in each line to other lines to determine if it is a duplicate item (compare data from columns A, B, E, F)
For example, raw data may be as follows:
Column A………Column B…….Column E…………….....Column F
10/13/2008…….11111111…….71879W561000……….888.88
10/13/2008…….22222222…….239103302000………..222.22
10/13/2008…….11111111…….71879W561000……….888.88
10/13/2008…….33333333…….353496508000………..333.33
10/13/2008…….44444444…….239103302000………..444.44
10/13/2008…….11111111…….71879W561000……….888.88
10/13/2008 ……11111111…….353496508000………..888.88............................
Note from above, there are two occurrences of a duplicate item. As a result, the output table would only list this item once.
I have attached a sample of the spreadsheet with dummy data on one tab and the desired output on another tab. Note that all the data is broken up into blocks of data that is separated by data that is only in the first column of the row.
View 5 Replies
View Related
May 22, 2013
Suppose I have some data in a column like below
Blue
Red
Green
green
red
RED
BLUE
I need a macro or excel formula so that it will remove duplicate products- case sensitive(removing all duplicate prod using using excel,that i know.) i.e. it should not consider Blue BLUE as duplicate. only consider Blue Blue as duplicate.
So the macro should work same as data -> remove duplicate function already exists in excel, except it will be case sensitive..
View 7 Replies
View Related