Compare 2 Columns For Close Matches
Jul 3, 2007
I want to compare two columns (from two different files, but copied into a new sheet) for duplicates or identical entries. But here's the trick, each entry contains atleast a number of digits. I'm not quite sure how to find items that may be 80% identical (in the right order, but might be messing a digit, or there is a dash or a 'o' instead of a '0'). I know how to do it in C++ or Java, but not quite sure how to do it in VBA/macro. Here's an example of what I meant. Let's say column one has the following:
0244-34
9393-O0
3932-44
and second column has
939300
493384
938923
If I was comparing second column to first column, it can pick up the 9393-O0 one because it's close enough to 939300.
View 7 Replies
ADVERTISEMENT
Aug 13, 2009
I've been searching for a method to compare two large columns of numbers and remove replicates from the "main" column. Column A has all the numbers that are in column B and many more. I want to remove all the numbers from column A that are in column B. The result being two columns with no matching numbers. (or a third column that has only the numbers from 'A' that are not in 'B').
My search results on this forum have found results that compare rows for matches & can make deletions; and also one method that could mark all the entries that were duplicates in both columns, but nothing to remove them. The datasets I am using have over 400k entries in some columns, so manual removal of marked ones is not feasible. I need an automatic deletion method.
View 2 Replies
View Related
Oct 24, 2007
I know there is a forumla to compare a small database to a list, but can't find it (I used to use French Excel).
Here is an example :
In a sheet, my small database :
(in two different cells)
Value1 and ValueA
Value2 and ValueB
Value3 and ValueC
etc...
In another sheet, my list :
I have a list where there's a lot of Value1, Value2... in one column, and in the next column, a lot of ValueA, ValueB....
I want to check in my list : if I have Value1, then, on the same row (next column) I have ValueA, if I have Value2, then, I should have in the same row (next column) ValueB....
And if I have Value1 and in the same row (next colum) ValueB, I want some kind of "Error" text.
Can't find this function nor (of course) the criteria to use it correctly.
View 3 Replies
View Related
Aug 12, 2008
I have two columns, one with the target text (D:D) and one with text I want to compare it too (A:A). If the text in column (D:D) matches the one in (A:A), I want to return the value in (B:B). I attached a sample of the problem i'm dealing with.
View 5 Replies
View Related
Sep 10, 2009
I have two sheets with pretty much the same content but not exactely. I need to compare the data from the first sheet to the data in the second sheet in this way:
data from column b (numbers) in the first sheet needs to be compared to data in column b in the second sheet. if this dosen't match it needs to go to the next line.
if the match is positive it needs to compare the data from column d on the first sheet to the data on the second sheet same column and copy the data from the first sheet's column d to the second sheet's column d. But only if the data in column d on the first sheet isn't blank. If it is it should leave the data on column d second sheet intact.
View 4 Replies
View Related
Dec 2, 2007
I am trying to compare mutiple columns of data, match them and copy select data. Find matching cells in 2 different columns and copy select info into that row. See file attached
View 7 Replies
View Related
Dec 23, 2007
I have a workbook with two sheets imported from different sources. Sheet 1 is an AdHoc query from an Oracle 10g based program. Sheet 2 (PBIC 8 in my file) is a report generated from a property accountability program. The information from Sheet 2 is manually inputted into the Oracle program that generated Sheet 1.
I would like to have a macro that would compare the cell contents in columns "RegistrationNbr" (column S) and "SerialNbr" (column T) with the cell contents in Sheet 2 (PBIC 8). The match in Sheet 2 could be an identical match or part of a longer string. The matching cells in both sheets should be highlighted.
One thing to be considered is the column names in Sheet 1 will always be the same but the column letter designation may change base on the fields selected in the AdHoc query.
I didn't realize my file was too large and didn't upload.
View 4 Replies
View Related
May 20, 2008
I have two excel sheets exported from two sources of information. Both sheets contain 1 column which is the primary data, ie, there is no duplicate of that information. Each information in these column represent 1 device in the real world.
Now, for example:
In one sheet, I have: SDV0620B
In the other sheet, I have: SSDV-B0620B
Please note that, both data actually represent the same device. What I now need to make sure is that, I ccan identify each corresponding data from the two sheets.
So, here is the problem that I am facing, identifying two data which are same but has two different representation techniques. (since the data are from two different sources)
I came up with the idea that, if I can check the sequence of characters with one column to another, then I might be able to pull it off.
For example,
we take SDV0620B, and match the sequence of character with SSDV-B0620B.
therefore, first is S (from SDV0620B)
match with SSDV-B0620B
then, D
match SSDV-B0620B
then V
match SSDV-B0620B
and so on, until the end.
And if the 1st sequence is found in the second sequnce of characters, then it is called a match! Hope I have explained it clearly. I have provided a file with some of the data copy and pasted out, to give you an idea of what the values look like.
View 9 Replies
View Related
Jun 27, 2014
I have two sets of data from columns A:N (O is blank) & P:AC. Column A & P are account numbers. I want to compare columns A & P for exact matches, there will never be any duplicates in either of these columns by themselves. If there is a match I would like that entire row to align, if there is no match I would like a row to be inserted. I have attached a copy of a worksheet of what I am looking to have done.
View 2 Replies
View Related
Mar 21, 2007
I've got two worksheets ("June" & "July"). On both worksheets, column A is comprised of ID numbers and column B contains dollar amounts. I need to compare the ID numbers in Column A on each worksheet, and if they match I want to copy the ID number and the amount to a third worksheet ("Results").
View 3 Replies
View Related
Jan 19, 2008
I have this code that compares two columns on two different sheets when it finds a match it then puts the match on that sheet your running it from in my case sheet 2. However i want to change this slightly and im having a hell of a time. I want to match but when tha match happens i want it to copy the cell next to the match.
Sub Find_Matches() ...
View 3 Replies
View Related
Jun 3, 2008
I am looking to create a code that searchs a column to see if there is word similar to the input (As in it's the same part name with a missing or extra letter or a space), and then return the first matched word.
View 6 Replies
View Related
Feb 16, 2008
2 worksheets,
Sheet 1 columns A&B are the same as sheet 2 A&B.
Sheet 1 is my master list (customer name = column A and carrier name = column B)
Sheet 2 (customer name = column A and carrier name = column B)
Sheet 2 is where data gets dumped so I need to change font to bold when I click a check box on sheet 1 (master list) on Column C
Check box is on column C and column C will have more then one check box.
When I click check box on C I need date to populate on column D
(But when I re-open my workbook I don't want dates to change on me using the system date)
My objective is to select customer carriers on my master list sheet 1 and update date and change font to bold on sheet 2 so I can avoid or skip that customer carrier.
Hope this is not too much for my first post.
View 3 Replies
View Related
Aug 7, 2008
I want to compare cell a to range c and extract comparing cell b to cell D. I might have explained it back words but see attached.
View 2 Replies
View Related
Nov 4, 2013
I have a Workbook containing four different Worksheets, each of which contains a different number of columns:
"Set A" = 18 Columns
"Set B" = 47 Columns
"Set C" = 47 Columns
"Set D" = 11 Columns
Each Worksheet contains a different number of rows, approx 4,000.
Column A for each of the above Worksheets is, however, the same and contains an alphanumeric string called "Accession ID".
I have been tasked with extracting the entire row of data for each "Accession ID" which appears on at least 2 Worksheets, and then compile them in a new "Summary" Worksheet.
So, for example, if one of the Accession IDs was "ABC123" and it appeared on all four of the Worksheets; the Summary Worksheet would contain the 18 Columns from the row on which "ABC123" appeared in "Set A", the 47 Columns from the row on which "ABC123" appeared in "Set B", the 47 Columns from "Set C" and the 11 from "Set D" all on different rows.
I tried toying with VLOOKUPs etc, but given there are four Worksheets, and in order to qualify the Accession ID must only appear on a minimum of two Worksheets - it quickly become a mess.
Is there any way of being able to do this as a macro perhaps?
View 2 Replies
View Related
Dec 17, 2007
I am trying to compare two sets of data in two different columns. But I only want an approximate match. That is: Data from one given cell, has to be matched to another given cell and if an APPROXIMATE match is found, return a 1, otherwise a 0. And that should happen all the way down in the two columns.
View 2 Replies
View Related
Aug 13, 2008
I have two excel sheets, one loads up in Listbox1 and the other in Listbox2, i would like to be able to see if any entries in listbox2 match with entries in listbox1 and then to display the matches in listbox3 with a click of a command button. Is this possible? If so, how would i go about it?
View 3 Replies
View Related
Jan 28, 2008
Here is the scenario. I am running a business and each day I download my orders for the day. The information includes customer names and addresses. The customer name is for example in column E. We will call this "Book1".
I have a second workbook that I use to store bad customer information. i.e. customers that I do not wish to sell to. The information stored here is customer name and address e.g. column A - customer name, column B - 1st line of address etc. This will be "Book2".
I wish to programmatically be able to compare customer names in column E Book1 to the customer names stored in column A Book2. Any matches found should highlight the rows (i.e. orders) in Book1.
I have tried to make this clear as possible. I want to be able to do this as a macro hence programmatically so when I click a button this comparison/highlighting takes place.
View 4 Replies
View Related
Jul 16, 2009
1) Background Info
We are trying to summarise some data that has been exported from an ancient database into a poorly delimited csv file. My colleague has imported the csv file into Excel ( attached), and we are trying to work out what to do next.
The dataset contains approx 300 records - each record being called a "sample" and having a unique sample number. NB: I have had to attach a cut-down version with only 3 samples, due to file-size - but it will hopefully give an idea.
Each sample contains 2 types of information that we are interested in (and a lot of irrelevant data besides). The relevant bits are:
- predicted occurrence of various species (given as a percentage for each species)
- observed occurrence of various species (given as positive/negative for each species, where positive is indicated by an asterisk)
2) What We're Trying To Do
We are trying to compare this dataset with a master-list of 80 species names. For each species on the master-list, we want to:
a) check whether it has a "predicted occurrence" value in each of the 300 samples (and if so, record the value in a summary sheet)
b) check whether it was observed in each of the 300 samples (and if so, record this in the summary sheet)
3) The Problem
Unfortunately, the dataset has imported into Excel as a gigantic list: 48000 rows (including loads of blanks) and only 3 columns across. To find the relevant data, it's necessary to:
a) open the attached workbook, and go to the worksheet named "Data"
b) Scroll through the rows, looking for the string "RIVPA" in column A. This tells you where each new sample begins. (The sampleID is stored in the same row as this, in column C. It is mixed up with a load of text, which we will need to separate out at some point, but that's a secondary consideration at the moment.)
c) Scroll down further until you find the text string "Predi" in column A. This indicates the beginning of the data we're interested in, for each sample (i.e. for sample 1, I'm talking about row 58). Count down a further 2 blank rows, and then you find the data itself:
- Column A contains the observed occurrence (a positive result is indicated by an asterisk)
- Column B contains the predicted occurrence
- Column C contains the species name
My colleague was trying to build a summary table, in the worksheet named "Summary". He was using the LOOKUP function to extract the data, but because there are so many samples, it's beyond unwieldy. He asked me if I could write a macro do do the job, and this is where I'm stuck.
How could I set up a macro that can identify where one sample starts and finishes, and where the data is within each sample? What is the most sensible shape for such a macro? If I could get the overarching logic worked out, I could make a start on writing the individual bits of code, but at present I just can't figure out how to begin.
To make things more difficult, the samples are not all the same length, and do not all contain the same list of species as each other. (However, at least there should be no species in the samples that are not in the master-list). The first sample begins on row 5, the second sample begins on row 173, the third on row 340, and so on.
View 8 Replies
View Related
Jan 28, 2008
I am running a business and each day I download my orders for the day. The information includes customer names and addresses. The customer name is for example in column E. We will call this "Book1". I have a second workbook that I use to store bad customer information. i.e. customers that I do not wish to sell to. The information stored here is customer name and address e.g. column A - customer name, column B - 1st line of address etc. This will be "Book2".
I wish to programatically be able to compare customer names in column E Book1 to the customer names stored in column A Book2. Any matches found should highlight the rows (i.e. orders) in Book1. I have tried to make this clear as possible. I want to be able to do this as a macro hence programtically so when I click a button this comparision/highlighting takes place.
View 2 Replies
View Related
Aug 7, 2008
I have two separate workbooks, each with a great deal of information, such as name, ssn, dates, statuses, etc. I would like to compare the SSN column for both workbooks, and when it finds a match (which there would be many) to copy the MOS cell from the same row to the other workbook. Here is my breakdown with names:
Workbook 1: Macros.xls
Workbook 2: MASS 162.xls
The SSN column is column C in both workbooks
When there is a match found between the SSN column in Macros.xls and the SSN column in MASS 162.xls, I need to copy the MOS cell (column E) from the MACROS.xls workbook to the MASS 162.xls workbook into the same row, but in column M, which is currently empty.
View 7 Replies
View Related
Apr 26, 2014
Sheet1 is Main Sheet which never will be amended and these numbers will be a source for pulling mathematical functions
See attached :
Sheet1.png
Don't be bothered about cell colors etc. They are for my reference
Sheet2
Will contain same Problem Ticket numbers but different (or same) values with number of 'Linked Incidents'
See screenshot
Sheet2.png
Based on Problem ID 10248
Main sheet shows 92 Linked Incidents
Value on Sheet two brings 93
If A5 Sheet2 value can be found in ColumnA Sheet1, look for a number in ColumnC, same ROW and compare it to C7 in Sheet2 ?
Bring up difference value, which in this case would be one.
View 1 Replies
View Related
Nov 14, 2009
If a row starts with T3:X3 matches up with the rows in range T6:X8605 then goto that matching row... perhaps could be done with a macro?
View 9 Replies
View Related
Oct 27, 2008
I have two lists of email addresses in columns and I need to find the matches between columns and have those addresses returned to perhaps a third column.
View 2 Replies
View Related
Jan 8, 2007
I have many small spreadsheets of data organised into 4 columns and anything upto 250 rows. I want to be able to test if all the cells along each row have the same data in each of the 4 cells, so 4 occurences of the same thing. Each row of data will be different. (I'm not intertested in matching the data going down the column).
However, I won't know with each spreadsheet what is the exact data I will be looking for - if all 4 cells don't have the same data, that is fine as this will then require my manual attention which is the purpose of my project.
I just want to avoid having to check through lots of rows of data where all the data does already match.
The data will usually be text but it can be IP addresses and numbers too. I need a formula or set of operators to use for is exercise.
View 7 Replies
View Related
Nov 30, 2007
i have one work sheet. Column A contains 800 names bolumn B contains 15,000 names.
I need to compare column A to column B then if the name exists displat the names in a seperate column.
View 2 Replies
View Related
May 30, 2014
I am trying to match words in two separate columns that are not exact matches. any formulas or codes I can write to do this.Below is an example.
Column A
3m Corporation
Apple Inc
Allstate Corp
State Farm
View 2 Replies
View Related
Jan 27, 2009
I have two columns of card numbers (16 digits) in text format, as column A and column B. In column C, I'm trying to figure out how to compare column A and B for matches, and display the match in column C, if there is a hit.
View 4 Replies
View Related
Jul 21, 2009
I need to line XYZ to XYZ as well as the information attached to XY&Z
i dont really know how else to explain it but i was hoping there was a macro or something out there that i could use to do this would make it a lot easier
View 8 Replies
View Related
Jun 23, 2014
I have a macro that I am working on which I have gotten stuck on. It compares Column A and Column C and any numbers which match are pasted into Column D.
What I am getting stuck with is I need to copy and paste the data for column B to Column E as well. So in other words.
If column A and B match then the number from Column A that matches B will be pasted in column D along with the value that is right next to it in Column B.
Attached File : MatchingMacro.xlsm
View 11 Replies
View Related