Macro That Compare Items In Two Seperate Lists In A Spreadsheet

Jan 20, 2009

I am trying to create code for a Macro that will compare items in two seperate lists in a spreadsheet, and eliminate all entries that do not appear in both lists.

View 9 Replies


ADVERTISEMENT

Compare Two Lists And Output Unmatched Items

Apr 17, 2013

I have two lists that I have compare to compare.

Expected result: Mark items matched in next to them, output unmatched items in column "J"

I started the code below. It properly marks the correct items, but I have trouble outputting them in Column "J"

Sub BNKREC()
Counter = 0
For i = 3 To 9
For J = 3 To 6
If Cells(i, "B").Value = Cells(J, "F").Value And Cells(i, "C").Value = Cells(J, "G").Value Then

[Code] .....

List 1:
Date Check# Amount
03/02/2013 100 $1,000.00
03/03/2013 101 $1,045.25
03/05/2013 102 $280.56
03/06/2013 103 $456.31
03/08/2013 104 $250.55
03/15/2013 105 $2,456.12
03/25/2013 106 $844.76

List 2:
Date Check# Amount
03/02/2013 100 $1,000.00
03/05/2013 102 $280.56
03/08/2013 104 $250.55
03/25/2013 106 $844.76

Expected result:

Un-Matched List:
03/03/2013 101 $1,045.25
03/06/2013 103 $456.31
03/15/2013 105 $2,456.12

View 5 Replies View Related

Macro To Seperate 2 Lists By 3 Rows

Aug 11, 2009

I want is a constant separation of two lists by 3 rows, one above another in one sheet. I have illustrated my desired change-and-results through the following images and hopefully they are self-explanatory.

I think its important to explain that I want the macro activated by the change of results in Column A in sheet2.

Current Sheet1
Current Sheet2
Current Sheet1 with Formulas
Current Sheet2 with Formulas
Sheet2's 1st Change (Time)
Sheet1 Response to Sheet2's 1st Change (Time)

Sheet2's 2nd Change (Replace)
Sheet1 Response to Sheet2's 2nd Change (Replace)

View 9 Replies View Related

Excel 2003 :: Compare Two Lists Of Names On Same Spreadsheet

Apr 18, 2012

In Excel 2003 I am trying to compare two lists of names on the same spreadsheet to determine which names are different between the two columns of names. What is the easiest way to do that?

View 1 Replies View Related

Macro To Compare 2 Lists Based On Multiple Criteria Using SUMPRODUCT?

Feb 27, 2014

I want to compare 2 lists in separate sheets based on multiple criteria and delete the duplicates

Sheet 1 - new list in column A:E
Sheet 2 - old list in columns B:F

So here is what I need: the macro should generate single IDs made of Sheet 1 Ai,Bi,Ci,Di,Ei cells for each row i to the end of the list + generate single IDs made of Sheet 2 Bi,Ci,Di,Fi

If . Evaluate (Sumproduct (IDs made of Ai,Bi,Ci,Di,Ei from sheet1) & Sumproduct IDs made of Bi,Ci,Di,Ei,Fi from sheet2) >1 then delete the entire row in Sheet 2.

This will leave me with only updated items (rows) in Sheet 2

View 1 Replies View Related

Formula To Have Spreadsheet 2 Pick Items From Pass / Fail Column On Spreadsheet 1

Jan 23, 2012

Workbook 1 has 2 spreadsheets. Spreadsheet 1 contains Item and Pass/Fail Columns. under the item column is the serial number of the item tested. the Pass/fail column has the serial number duplicated if it failed tested. what is the formula is to have spreadsheet 2 pick the items from the pass/fail column on spreadsheet 1?

View 4 Replies View Related

Creating Summary Spreadsheet From Two Seperate Spreadsheets

Mar 16, 2007

I have two spreadsheets. I need to be able to match information from detailed spreadsheet for specific information from a lookup spreadsheet.

The detailed sheet (call it Purchases) has information about what was purchased during a month.

Columns: ...

View 9 Replies View Related

Cutting Rows To Seperate Spreadsheet Based On Certain Criteria

Jul 19, 2006

I have to look through an entire table and find certain criteria (eg. "STEVE'S PIZZA SHOP"). It might be in columns G or H, or it could also be in Columns C or something of that nature. What I'd like to do is search through the table, find each instance of said criteria and cut each row the criteria apperas in to a different sheet. I'd like to do this as a macro, so I can set it up for other criteria as well. In addition, if I can include in the macro a way to create a header row (which I'm pretty confident I can myself), as well as change the title of the sheet the information is moved to. I have looked up Do-While loops, For-Next loops, If-Then loops. I am at a total loss.

View 9 Replies View Related

Compare Multiple Sheets And Paste Unique Records In Seperate Sheet

Aug 4, 2008

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.

View 6 Replies View Related

Automatically Add Items To One Of Several Lists In Another Worksheet?

Jul 4, 2014

I have two worksheets. In the first one column holds the names of universities, and the next column holds employee names. For example:

London Metropolitan University | Chris Davis
London Metropolitan University | Sean Joesbury
London Metropolitan University | Stefano Carlino
London South Bank University | Simon Forsbrook
London South Bank University | Peter Lacko
University College London | Ben Burch
University College London | Oli Lan

In the second sheet, I'd like the universities to appear as headers to the columns, with all the employees of that uni to be listed underneath. I'd also like for these lists to be updated automatically as new rows are entered in the first sheet.

View 3 Replies View Related

Randomly Select Items From DV Lists

May 14, 2012

I have a column of DV lists. Is it possible for me to make excel, go through each DV list, and randomly select an item from each DV list?

View 1 Replies View Related

Sorting List Of Items Into 2 Separate Lists

Oct 25, 2011

I work for a printing company that prints labels. We have 6 printing presses, lets call them A,B,C,D,E & F. Certain labels can only be printed on printing press F.

From our business system I can run a report in excel format giving details of all the labels that we have sold in the present month. I need split that report into 2 separate excel spreadsheets; 1 showing everything that was printed on presses A to E and the other showing everything printed on press F.

I also have another excel spreadsheet which gives a complete list of all the labels that have to be printed on press F.

Every label that we print has a part code and both spreadsheets show this part code so that would be the linking factor between the 2 sheets.

View 1 Replies View Related

Creating Drop Down Lists With Same Multiple Items

Apr 6, 2007

Looking to create a drop down list on the top of a column that will find all entries with that numerical value. For example, lets say I have four entries with the value 1234 spread out through the columns. When I click the drop down menu, it should only have 1234 once and when I click it, it shows me all the rows with that entry.

View 2 Replies View Related

Compare Two Lists

Jun 9, 2009

I have two separate lists, one in Column A and the other in Column B. Both lists are roughly 2,000 rows long. For the most part, the two lists are identical, but not quite.

I'm trying to determine what data is present in Column A that is absent from Column B, and vice versa. That's easy enough to do with COUNTIF (at least that's what I've tried), but to complicate matters, duplicate entries appear in both column A and column B.

For example, in column A, the word "Electric" appears 13 times...but in column B, it only appears 8. I need to know these differences in a quick and easily readable way (remember, the spreadsheet is roughly 2,000 rows).

View 5 Replies View Related

Selecting Unique Column Items Into Seperate Worksheet From Column

May 19, 2006

In the attached file, details sheet contains multiple instances of project with associated costs for each of 2006, 2007 and 2008. What I need is a formula (preferably) or a VBA that select distinct project names and populate column B of summary sheet so I can do a sum if. The problem is the project names changes dynamically every week and they are practically in hundreds.

View 9 Replies View Related

Sorting Long Lists - Extract Multiple Items

Jan 13, 2013

I have two lists. A1:A7000 has 7000 items and B1:B10000 has 10,000 items all in random order. List B includes all the items on list A, but with an additional 3000 items. How can I extract the 3000 items that are exclusively on list B? I would like to put these on a new list C1:C3000.

View 6 Replies View Related

Compare 2 Lists - 6 Columns

Mar 20, 2012

I need to compare 2 lists (each list has 3 columns [first name, last name and email address).

I am trying to compare columns A(incl. First name), B(incl. Last name) and C(incl. email address) to columns D, E and F.

D, E, and F are also First name, Last name and e-mail address respectively.

I need to compare A, B, and C to D, E, and F and find duplicates and highlight them.

View 1 Replies View Related

Compare Innventory Lists

Jan 9, 2009

Every Monday, our database sends me a list in excel, with a snapshot of our inventory.

Here is (simplified) how it looks like

part#, desc, color, units
001 Camry Black 13
003 Toyota Green 2
009 Honda Yellow 17

and so on for about 8k rows.

Every Monday, the list is different. we sold some items, so the "units" in stock are less, we run out of some items, so that part# is not in the list,
we acquired some new items, with a different part#, and new amount of units, some part#s have more units in stock.

I need to send to our boss, a spreadsheet with a list of all part#s in stock every Monday, and the last 4 weeks, how many we sold of each in the last 7 days, so we can try to get rid of inventory that is getting obsolete.

It would be easy to do, if not for the fact of the "new" items that come in, and the items that we run out of, and are not in the list anymore. With 8k items, to to the corrections by hand, it gets old very quickly

View 10 Replies View Related

Compare Lists Of Data

Jun 5, 2007

I need to search a column of numbers in Excel (A) and compare it to another column (B). I need to find all of the numbers that apprear in column A but not in column B. Can this be done?

View 4 Replies View Related

Compare Values Between 2 Lists

Nov 26, 2007

how to compare the value in one cell on sheet "Block #1" to a list of values on sheet "Data". Specifically I want to be able to look at the value in a cell (which will be a date) and then compare it to a list of company holidays on another sheet in the workbook and if the date is a company holiday it will display the word "Holiday" in another cell I specify on "Block #1" I am doing this to automate generation of a calendar which will have 13 worksheets one for each of 13 4-week blocks. I can get the calendars generated, but can't seem to be able to get it to compare the values of each date to the list of holidays.

View 3 Replies View Related

Compare 2 Lists & Return Details

Nov 22, 2006

I have a list of two rows of over 20,000 items. I would like to know what data has been added to the second row from the first row and what has been removed.

View 4 Replies View Related

Compare Lists Flag Differences

Jan 9, 2007

I am currently trying to work out what the best way would be to search between two sheets and find out where the differences are. IO have sheet 1 and 2 which both have account numbers and details on. I searching off the first column on both sheets and trying to identify which records exist on sheet 1 but not on sheet 2. The code I have so far is

Sub check()
data_sheet = "Sheet1"
target_sheet = "sheet2"
rowcn = 2
Do
If Sheets(data_sheet). Cells(rowcn, 1) <> Sheets(target_sheet).Cells(rowcn, 1) Then
Rows(rowcn).Select
Selection.Font.ColorIndex = 3
End If
rowcn = rowcn + 1
Loop While Sheets(data_sheet).Cells(rowcn, 1) > 0
End Sub

This currently works 50%. Only problem is that this code is not independant to each list, it simply looks at the same cell reference on both sheets and check whether the value is there. It doesnt actually go down the whole list and checks whether it is there.

View 5 Replies View Related

Compare Lists & Highlight Duplicates

Jul 3, 2007

I receive a daily spreadsheet which contains (amongst other information) a column of postcodes. I'd like to run a macro which compares these postcodes with a list of other postcodes, and then to colour highlight each instance of that post code in the daily spreadhseet.

I have been able to find and modify a macro but that searches for one post code at a time and then adds a comments box to the cell.

Instead of copying that piece of code and editing it for the several hundred post codes I need to "look up" against, I'd like to know how to create a list of post codes in the macro, so that the macro searches the first post code in the lookup list, finds and highlights each cell instance, then moves onto the next post code in the lookup list, until the end of the lookup list. I would like this as the editing of the lookup list would be much easier than editing paragraphs of code.

View 9 Replies View Related

Compare 2 Lists & Return Non Dupilcates

Nov 25, 2007

i have a list in column "a" in sheet 1 and a list in sheet 2 column "b" range from row 1 to 50

i would kike to get the data from sheet1 that is not in sheet 2 and copy it in to sheet 3

View 6 Replies View Related

Compare Before Spreadsheet Data To After Spreadsheet

Apr 2, 2014

Wondering if there is an easy way to compare 2 spreadsheets that should have identical data on them? The first spreadsheet (Before) has the output data from 'before' a code fix was applied. The second spreadsheet (After) has the output data from 'after' a code fix was applied. The spreadsheets have 7 columns of data and almost 500 rows.

I've already copied the data from the source datasets provided by my IT folks into Notepad (.txt) files and then used Excel to open them as fixed width spreadsheets. I have 1 workbook with 1 spreadsheet with 'before' data. And, I have 1 workbook with 1 spreadsheet 'after' data. And, I have another workbook that contains both worksheets. So, I'm ready to go whenever I get hints of what to do next. :-)

I need to be able to show my client that we did not impact the data with the code fix that was applied. I want to be able to show my client contacts (business folks) an end result via Excel that confirms that I actually compared the 2 sheets and there were no differences. In other words....I can't just show them a formula with '0' as it end result (even tho that's basically what I'm trying to prove).

View 6 Replies View Related

Compare Two Similar Lists To Determine What Is Missing?

Jan 29, 2014

is there a formula I could use to compare two similar lists to determine what is missing, for example an old list of 200 lines and another of 275 lines, with a first column containing unique ID code.

View 1 Replies View Related

How To Compare And Combine Data From New And Old Product Lists

Mar 19, 2014

I have two spreadsheets full of products one of new products and the other of old products. I want to filter out the old ones that are discontinued but keep the ones that are still there. The old list has data I want to preserve for the new listings that would be duplicates from the old ones. I want to delete the new listings that already exist in the old list. I'm not sure exactly how to do it. I tried to delete dups based on product id or name but I'm afraid it's deleting entries I want to keep. Both lists contain over 5000 products each. I need to compare two lists and filter out the old products then work on removing the dupes.

View 3 Replies View Related

Compare Two Email Lists And Output Non-matching

Nov 20, 2008

I am a newbie and need your expert help please.

I have two email lists. For example they are:

List 1:

a@spam.com
b@spam.com
c@spam.com

List 2:

abcdef@spam.com
b@spam.com
c@spam.com

In list 1 the non-matching address is a@spam.com. namely it is not common to both lists. I want to automatically go through the lists and output firstly a new list of the non-matches from column 1 and also a new list of the non-common items from list two.

So in this case the result would be that somewhere there is a new list from list 1 that has "a@spam.com" and secondly there is a new list from list 2 that has "abcdef@spam.com."

Obvioulsy the real list is more complicated and longer but the principle will be the same.

View 10 Replies View Related

Compare And Display Similarities/Differences In Two Lists.

Jul 24, 2009

I have searched some of the other forums but have not found anything specifically related to what I'm trying to do.. An example is attached. Basically just want to compare data between two different lists and then in two additional columns (Differences & Similarities) display that corresponding data.

View 3 Replies View Related

VLookup To Compare Two Lists And Add Difference To One List

Sep 1, 2013

I am trying to compare two lists and extract from one to add back to the source. However neither are alphabetically.

List 1
accessories
belt
boots
cardigan
coat
glasses
gloves
hat

List 2
tshirt
tshirt
jumper
jumper
jumper
tshirt
shoes
cardigan

So i would the vlookup to add automatically back to list 1 tshirt, jumper and shoes.

List 1 would now look like this

accessories
belt
boots
cardigan
coat
glasses
gloves
hat

tshirt
jumper
shoes

View 3 Replies View Related







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