Compare 2 Lists of Data in Excel - Tutorial & Download Example
Compare 2 Lists of Data in Excel - Tutorial & Download Example
org/wp/compare-2-lists-in-excel/
Share
" ! Facebook " Twitter # LinkedIn
Chandoo
1 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
We will learn how to compare 2 lists of data in 3 + 1 different ways. (click on links to jump to Welcome to Chandoo.org
that section of post) Thank you so much for visiting. My aim
is to make you awesome in Excel &
1. Highlight items that are only in first list Power BI. I do this by sharing videos,
tips, examples and downloads on this
2. Highlight items that are only in second list
website. There are more than 1,000
3. Highlight items that are in both lists pages with all things Excel, Power BI,
4. Search and highlight matches in both lists – Home Work Dashboards & VBA here. Go ahead and
spend few minutes to be AWESOME.
Apart from looking like circles drawn by hulk with a crayon, these circles show important concepts of Want an AWESOME
set theory in simplest form. Excel Class?
[there is a fourth possibility of a value not being in either lists, we omit that for now]
2 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
2. Also, you should know how to use COUNTIFS Excel Formula, it is so awesome, I wonder why
3 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
20 Excel Templates
Calendars, invoices, trackers and much
more. All free, fun and fantastic.
values are in
B21:B29)
13 Advanced Pivot Table Skills
2. Go to conditional
Power Query, Data model, DAX, Filters,
formatting > add rule Slicers, Conditional formats and beautiful
(related: conditional charts. It's all here.
formatting basics)
as “formula”
=COUNTIFS(lst2, B21)=0
4 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
− Recent Articles on
Chandoo.org
Advanced
Data
Viz
with
1. Select values in second list (assuming the values are in C21:C28)
Excel –
2. Go to conditional formatting > add rule (related: conditional formatting basics) Live
3. Select the rule type as “formula” Event
4. Write a rule like this: =COUNTIF(lst1, C21)=0 on 26
5. Repeat steps 5-8 as above. March
Come and join
me for a free
Highlighting Values in Both Lists: live event on
advanced
data
visualization
with Excel on
26th March
(Friday).
Details inside.
5 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
13 to get
formula Department
examples Budget
to really for a
understand Month
Now, it gets interesting as you should apply conditional formatting individually to both lists. it [Homework]
6 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Of course, doing this is very straightforward in Excel once you understand the above 3 things. So I
Go ahead, figure this out, practice it on a workbook. When you are satisfied with your result, post
Go ahead and download the example workbook on comparing 2 lists in excel. [download
from mirror]
It also contains the answer to homework above. Play with it and become comparison ninja.
I often have to compare values in multiple lists (for eg. customers of one product vs. another, defect
status this month vs. last month etc.). I use formulas to compare with-in table. And if I want to
What about you? How do you compare lists of values in Excel? What formulas do you use? Please
7 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Excel
Power BI
! 112 Comments
$ Ask a question or say something...
! Tagged under comparison, countif(), data visualization, downloads, Learn Excel, Microsoft Excel
Conditional Formatting, Microsoft Excel Formulas, named ranges, screencasts, search,
spreadsheets
8 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Advanced Data Viz with Excel – Live What is XLOOKUP? 13 formula examples
Event on 26 March to really understand it
9 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
10 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
0/05/27/comparing-two-lists/
here's a twist: what if I wanted to create a validation list on the home work example, using a
single list containing the unique values from both lists? How do I do that?
Rgds,
Martin
Reply
Hi Chandoo,
11 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Can u Explain how to searched a value matched items in both list, i tried many times but i
cant sort it out
Reply
Can you send me the file that has this conditional formatting with the find function. TY
Reply
4. Gregory says:
June 17, 2010 at 6:45 pm
Something I would consider is looking at all unique values for both lists,which would be the
compliment of customers in both lists.
When you compare two sets of values, as your Venn diagram shows, there are four possibilities:
1) Only in List 1
2) Only in List 2
3) In Both Lists
4) Not in Both Lists (the mathematical compliment to 3)
Reply
5. Alan says:
June 17, 2010 at 9:22 pm
Very good post. I've never considered using CF in this way but can see the possibilities.
Comparing tables I will usually uses vlookup or index/match.
Reply
6. Chandoo says:
June 19, 2010 at 1:59 am
12 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
/wp/2009/10/15/dynamic-chart-data-series/ )
Reply
BASHA says:
September 12, 2018 at 5:07 am
Reply
7. sam says:
June 20, 2010 at 12:30 pm
Reply
8. Artem says:
June 30, 2010 at 4:08 am
The quickest way to find all about two lists is to select them both and them click on Conditional
Formatting -> Highlight cells rules -> Duplicate Values (Excel 2007). The result is that it
highlights in both lists the values that ARE the same. Then in one list non-highlighted are values
that are not present in the second list, and opposite for the second list. I think it is sell "geeky",
but it gets job done very very quickly when you don't want to mess around.
Reply
sreekumar m k says:
July 24, 2012 at 7:55 am
13 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Reply
Jon says:
March 11, 2013 at 4:37 pm
Tried this as a reconciliation tool but it fails as it also highlighted the number if duplicated
in the first list e.g if 2.8 appears twice in list one it is highlighted although not appearing in
list two.
Reply
9. Chandoo says:
June 30, 2010 at 4:44 am
Reply
10. Even Faster Way to Compare 2 Lists in Excel [Quick Tip] | Chandoo.org - Learn Microsoft Excel
Online says:
July 1, 2010 at 8:42 am
[...] week we discussed a fun and easy way to compare two lists of data in excel using
conditional formatting. In that post, Artem commented, The quickest way to find all about two
lists is to select them both [...]
Reply
Using Become a Comparison Ninja – Compare 2 Lists in Excel and Highlight Matches topic, how
do I compare data that is non identical. Example US Telepacific Co vs U.S. Telepacific Company.
and sometimes I will have the parent's company name like Brenntag North America Inc vs
Coastal Chemical Co (this being the same company). Can I email you my data so you can give
me the most efficient way to do this? I've tried =IF((LEFT(A1,3))=(LEFT(D1,3)),TRUE,FALSE)
which will compare the first three characters and then I will "eyeball" the rest to match them up.
I have tried vlookups to match the information. Is there another way to do this?
14 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
comparing the the first characters of the name and eyeballing the rest. Is there a more efficient
to do it. Can I email you a data sample of what I'm talking about? Thank you,
Reply
@Fernando.. you mean compare but do not highlight if cell values are synonymous? now that is
an interesting problem.. let me think about it and get back to you..
Reply
Hi there, I noticed that usisng the solution you provided, for Beth (for instance) it highlights even
Elisabeth (because having the part "beth" in it I guess) using the following conditional format
=AND($B$4"";COUNTIF(B8;$B$4))
instead of the original one i.e: =AND($B$4"";COUNTIF(B8;"*"&$B$4&"*"))
gave the result shown on your page (this one!)
Kader
Reply
You can do the same using simple boolean operators in lieu of COUNTIF
15 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
chern says:
June 17, 2015 at 3:29 am
Hi Tim.
Thanks for the tip. I'm very new to excel and was just wondering do you know how to
make excel highlight the duplicate cells concurrently? As per chandoo's GIF. Thanks!
- Chern
Reply
The comment engine removed my not equal sign, so replace "not=" with the appropriate symbol
and the following should work.
You can do the same using simple boolean operators in lieu of COUNTIF
This method (like COUNTIF) finds exact matches only. To highlight the partial matches like your
.gif file demonstrates for the homework, SEARCH or FIND as suggested by Vijay is the best
solution I think. I don’t run 2007, so the Duplicate Values to me is not useful.
Reply
16 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Cheers!
Khushnood
Mumbai
Reply
Hello,
I need help with a formula. I've got two spreadsheets of data. I need a formula that will look at
both lists and find a match of the product number (C2:C400), and if it does match then it will
look at the product price (E2:E400) for a match. I don't care what value is returned for the
matches.
Reply
If u display the steps with the picture that will be more easy to learn.
Reply
17 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Reply
Chandoo,
@fernando and @Chandoo in regards to comparing lists that are similar but not exact - i have
run across problems on a massive scale and "eyeballing" the matches becomes impossible.
For example - imagine a list of all professors at a university: names come in many formats with
middle initials, two middle initials, PhDs, MDs, and various other issues. The text document is
then split out via "text to columns" and I have little confidence that i can pull last names or first
names out accurately.
I have to then compare those professors to lists of various professional organizations that they
may be affiliated with their own unique lists that may or may not match my professors names 1
to 1. This exercise could be used to see how large the universities network has grown.
The methodology i have used starts with finding last names and concatenating a first initial (eg
SmithP for Peter Smith). Then try the same method with the lists of professional organizations
and attempt to match.
Can you think about more efficient ways to compare non-exact data? Or is Excel not the right
tool for this job?
Reply
I generally use a fuzzy match algorithm in cases where I need to match values that have spelling
mistakes, extra spaces etc. Use the below UDF in your conditional formatting and you should be
able to solve good portion of the problem.
http://chandoo.org/wp/2008/09/25/handling-spelling-mistakes-in-excel-fuzzy-search/
18 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
lst1, lst2??? I have 2 columns of data. How do I tell Excel which column is lst1 or lst2??? This
does not help me.
Reply
@Eric where they have used Lst1 put your range in eg: A1:A20
Or you can name the ranges as well
Reply
27. Quickly Compare Data using Row Differences | Chandoo.org - Learn Microsoft Excel Online says:
February 14, 2011 at 9:09 am
[...] and you want to compare row by row to spot the differences. Of course you can write a
formula or apply conditional formatting. But there is a quick and dirty solution that works just as
[...]
Reply
28. PM says:
April 13, 2011 at 8:20 am
@ Eric: Highlight the 1st list and right click and pick "Name a Range", thats how Chandoo has
defined Lst1 and Lst2.
Reply
19 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
I need to filter the above list for a smaller, but broader set of titles, such as:
-Fire Damage*
-Fire Repair*
But not:
-Fire Prevention
-Fire Prevention Services
But the COUNTIF function doesn't seem to like wildcard words if the wildcard is in another list.
Any ideas?
Reply
Reply
Reply
20 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Hi Chandoo,
I have question we can highlight same value in 2 coloumn, but in example if column a have
3time 101, 101, 101, and colomn b have only 1 time 101. So if i use conditional formetting it
highlight all four cells but if i want 1 from a and 1 from b only means howmany times in column a
that only time in coloum b should be highlighted how that possible ??? ... pls. advice me
Reply
35. Compare 2 Lists Visually and Highlight Matches | Chandoo.org - Learn Microsoft Excel Online
says:
October 27, 2011 at 8:56 am
Reply
Reply
How can I compare Column A with Column B and Column C and smallest of the 3 in Column D.
Assume they are in the same ROW. Please advise
Reply
@Soon
In D2 put =Min(A2:C2)
21 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Hi All,
Need help, i have to generate reports weekly and do comparison between last weeks report vs
today's report to know what changes/progress have been happend in recent week.
Reply
Hi all,
Really struggling with this conundrum...
I have to do a comparison between to sets of staff lists, where name that are highlighting in the
first list who do not appear in the second list have left the firm, and people highlighting in the
second list who do not appear in the first are new arrivals.
To further muddy the issue, when I say 'list', what I actually have is one column for 1st names
and another for surnames in both instances.
Reply
I've successfully used the =COUNTIF(Lst1,A21) formula originally described above to great
success either in conjunction with conditional formatting (=COUNTIF(Lst1,A21)>0) or stand
alone =COUNTIF(Lst1,A21).
22 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
and
Cheers
Mark A
Reply
Thanks
Reply
Matt says:
February 17, 2012 at 11:05 pm
If you're using Excel '07 or '10, you can use the VLOOKUP function for that.
23 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
I've been trying to figure out how to do this in excel for AGES! Seriously! I think I'm going to put
together a sweet spreadsheet evaluating the pros and cons of all the different mold removal
services that I can find to experiment. My bathroom is crazy gross lately, so it will be a good way
to push me towards getting something done about it...
Reply
Love your site and formuals.. Very helpful. I need to do excatly what you described in the
beginning: Compare to columns with data and highlight the ones that are matchs in both
columns; the twist is, i need to have the non matches deleted from both columns.
Reply
Chandoo says:
March 26, 2012 at 5:59 am
You can do this with VBA. To know the basics, visit http://chandoo.org/wp/excel-vba/
Reply
Reply
Chandoo says:
24 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
I have the same issue as Fernando. I found this site when doing a google search. I have two lists
- both of just the company name (so there is no other data to compare). I need to find out which
ones are duplicates but the tricky part is that they may not be an exact match. For example, list
one may have "Global Company Inc." and list two may have "Global Co." - Is there a way to note
if the names are similar? I usually use =If(Countif(A$2;A$1099,A2)>1,"DUP","") to find
duplicates without deleting them but it only works for exact matches.
Reply
Dear Chandu,
My salesman from other city sends me an excel sheet on daily sales update. The excel sheet has
31 rows for each date and he enters his sales for the day in the row as per the date. I want that
while he is sending me the data for today, he should not be able to edit/change the previous day
figures (rows). How can I do it ?
Reply
49. JP says:
April 23, 2012 at 3:04 pm
Is "lst1" the name of the worksheet? I have 2 worksheets, 1 list on each, and I'm trying to
identify duplicate entries. Could anyone offer input on how to format this? Many thanks.
Reply
Hui... says:
April 23, 2012 at 3:19 pm
@JP
Chandoo has written several posts on the subject
Type Duplicate into the Google Search Box at the top right of the screen
Reply
25 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
side. Using the "magic" filter function, you can quick sort out matching or non-matching rows.
Reply
Hi Chandoo.
Ex.
List-1 List-2
ac
bb
ce
dd
I want to find number of cells in list-1 matching with its corresponding cells in list-2.
In above example i want to compare A2 with B2, A3 with B3 and so on.
That means in the example above it should return me 2.
I haven't surfed your site yet, but looks very interesting, i'll surf more often.
Thanks.
Reply
can anyone help me to match 2 colum of serial number in excel 2003 please thanks,
Reply
26 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
54. AG says:
May 18, 2012 at 7:27 am
Hi, I am new to the Excell and my question is possibly has been asked before (if that's the case, i
do apologise). I have a problem with matching a data in two lists. One list contains the product
code in one column and product description in another column. The other list contains the
product code and other data (3 or more extra columns) but no product description. How can I
merge both lists so the second list then contains the product description as well (matched to the
appropriate product code). Mind you, both lists are not identical in size and the second list does
not contain all product codes. Thank you for your assistance.
Reply
Matt says:
May 18, 2012 at 2:57 pm
AG,
If you are using Excel '07 or above, you can use the VLOOKUP function to add the
description from List_1 to a column in List_2.
=VLOOKUP(<List2_ProductID_Cell_Ref>, <List1_First_Cell_ProductID> :
<List1_Last_Cell_ProductDesc>, 2, FALSE)
This looks up the ProductID from List_2 and reports back the Description from List_1.
Reply
AG says:
May 21, 2012 at 6:47 am
Thank you Matt for your reply. I have tried to play with this code, but being very
new to this business of Excell, I have trouble to implement it correctly. Can
someone please provide me with step by step description of how to insert it into the
worksheet to make it work? I am using Excell 2010. Cheers, AG.
Reply
Matt says:
27 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
LIST_2
____J____|____K____|__L__| _____M_____|
1|_ITEM__|_PRICE__|_LOC_|_SHIPPING _|
2|_BWGN_|_$10.00_|__1___|_____$5.00_|
3|_GWGN_|_$12.00_|__2___|_____$5.00_|
4|_RWGN_|_$15.00_|__1___|____$10.00_|
If you wanted to add the description into LIST_2 from LIST_1, you would
enter the following formula into the corresponding CELLs:
N2: =VLOOKUP(J2, $A$2:$B$4, 2, FALSE)
N3: =VLOOKUP(J3, $A$2:$B$4, 2, FALSE)
N4: =VLOOKUP(J4, $A$2:$B$4, 2, FALSE)
Reply
Now if i want to compare data and find out only those account numbers where balances are not
matching or the uncommon ones.
28 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
in the family with different balances as per my software and as per bank.
Reply
All techniques presented here are good, but it's lengthy and it requires some thinking. I Googled
and found the web site below offers several Excel programs that can do the same at lightning
speed, and it does all the hard work for you at a touch of a button.
http://www.excelville.com/profile/Excel-Power-Utilities
In this web site, I found the following programs are extremely helpful:
1/ Synchronized Excel Workbooks Comparison
2/ Find Delete Duplicate Rows
Take a look, and I hope you find what you are looking for.
Reply
Matt says:
May 18, 2012 at 2:47 pm
Excel 07/10 have a "Remove Duplicates" function under the data tab. All of those NOT
FREE pages are only for Excel 2003.
Reply
Even though it said Excel 2003, but in the description of the "Synchronized Excel Workbooks
Comparison," it said "the program has been tested under Excel 2000 through Excel 2010, and it
all worked as expected."
I bought the program and tried it out using my Excel 2010 at work, it performed beautifully as
expected, and I saved many many hours of tedious work! My worksheets at work have too much
data, and it would be impossible if if I have to do the comparison manually.
I also tried out the "Find Delete Duplicate Rows" program, and again, it worked for Excel 2010
too. I think maybe the programs were developed using an older version of Excel, but with the
29 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Hai,
I want to compare two clumns, consedering one column is standard and the another column is to
check with that statard column and i want to highlight the another column with color. pls help to
get the problem solved.
Reply
Matt says:
July 9, 2012 at 3:52 pm
If you are using Excel 2007/2010, you can use conditional formatting to highlight the
Matched cells. In the example below, Column C contains your lookup formulas (i.e.,
=IF(MATCH($B1,$A$1:$A$10000,0),”*”,””)). Then you would highlight Column C and
choose your conditional formatting (Home tab) to only highlight the cells that contained an
asterisk (*).
_*_|__A__|__B__|_C_
_1_|_abc_|_www_|___|
_2_|_cde_|_xyz_|_*_|
_3_|_fgh_|_def_|___|
_4_|_xyz_|_cde_|_*_|
Reply
Hello - I have succesfully used the countif function in the past for comparing lists, but am
running into some issues wher I cannot figure out why the countif function is not finding
matches. Using the Conditional Formatting trick above is way cool, but did not work either, so I
30 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
150M-2FA
150M-3FA
150M-5FA
200M-5FA
200M-71/2FA
2C100PE
CT05FAB
2C100
Thanks - Jeff
Reply
Jeff says:
July 23, 2012 at 2:23 pm
Here is the comparison list values that are not wroking - they look identical, but can't find
each other, unless I manually retype them over replacing whatever formatting issue they
were having.
One list came from an excel sheet, the other from a copied PDF file, with paste special as
values
125M?2FA
125M?3FA
150M?2FA
31 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
2C100
-Jeff
Reply
Matt says:
July 23, 2012 at 3:48 pm
Here's a quick solution: I put your first list in Col A and the second in Col C (so you
have reference in the formula), and then the formula in Col F.
I simply had it lookup the value and return it if it was found.
=IF(NOT(ISERR(FIND("-",A1))),VLOOKUP(REPLACE(A1,FIND("-",A1),1,"?"),C$1:C$10,1,FALSE),VLOOKUP(A1,C$1:C$10,1,FALSE))
It basically states that IF the formula FINDs "-" in the ref cell, to do a VLOOKUP of
the value, REPLACEing the "-" with a "?" when it looks it up. If it doesn't find "-"
then it does a VLOOKUP for the unmodified cell value.
So,
125M-2FA = 125M?2FA
125M-3FA = 125M?3FA
150M-2FA = 150M?2FA
150M-3FA = 150M?3FA
150M-5FA = 150M?5FA
200M-5FA = 200M?5FA
200M-71/2FA = 200M?71/2FA
2C100PE = #N/A
CT05FAB = CT05FAB
2C100 = 2C100
Reply
Jeff says:
July 23, 2012 at 5:29 pm
Matt,
32 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
2C150)/ The only way I got it to matach was by typing over the "2" in the
second data set "2C100". Obviously not a solution for comparing large data
sets.
Reply
Matt says:
July 23, 2012 at 5:43 pm
The 2C100 was finding the identical match. It was the 2C100PE that
turned up N/A. I didn't account for that in the formula. You could just
add another nested IF statement to account for extra characters at the
end if it's going to be relatively patternistic.
You may want to check out this Fuzzy Search add-in. I may solve the
problem: http://www.microsoft.com/en-us/download
/details.aspx?id=15011
Hi friends,
We can use vlookup to compare two lists. If you want to search the existence of one list in
another list, write vlookup function after the bigger list and select the smaller list as the table
array. And drag up to the end of bigger list so that we get the values in the smaller list in the
respective position and rest of the cells shows #N/A error.If your bigger list is A2:A95 and
smaller list is C2:C9 then,
Here is the formula:
VLOOKUP(A2,$C$2:$C$9,1,0)
This is a simple method if you want to filter out a list of records from a big database
33 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
this out...I don't have time to read all the replies at the moment!
Andy.
Reply
Hi,
I need a help,I am trying to compare two sheets with reports of different environment say dev
and prod,i will have two columns matching in both list,I have to pick exactly matching records(i.e
first and third column match) and fetch the matching records one after another in new sheet to
get the average time taken in dev and prod.I am trying with macro but still i am getting
unformatted result.can you help me on this?
Sub Compare()
' Macro1 Macro
' compare two different worksheets in the active workbook
CompareWorksheets Worksheets("Sheet1"), Worksheets("Sheet2")
End Sub
34 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
dupRow = False
Application.StatusBar = "Comparing worksheets " & Format(i / maxR, "0 %") & "..."
For r = 1 To lr2
For c = 1 To 3
If (c = 2) Then
GoTo 46
End If
ws1.Select
cf1 = ""
cf2 = ""
On Error Resume Next
cf1 = ws1.Cells(i, c).FormulaLocal
cf2 = ws2.Cells(r, c).FormulaLocal
On Error GoTo 0
If cf1 = cf2 Then
dupRow = True
Exit For
Else
dupRow = False
End If
46: Next c
If dupRow Then
Exit For
End If
Next r
If dupRow Then
dupCount = dupCount + 1
ws1.Range(ws1.Cells(i, 1), ws1.Cells(i, maxC)).Select
Selection.Copy
Worksheets("Sheet3").Select
Worksheets("Sheet3").Range(Worksheets("Sheet3").Cells(lr3, 1),
Worksheets("Sheet3").Cells(lr3, maxC)).Select
Selection.PasteSpecial
lr3 = lr3 + 1
ws2.Select
ws2.Range(ws2.Cells(i, 1), ws2.Cells(i, maxC)).Select
35 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Reply
The above formula works when there is an exact match between two lists. i.e
List 1 List 2
ATT ATT
Verizon VERIZON
Sprint Sprint.......
Question:
But i want to match and highlight two lists which has similar names.
Example:
List 1 List 2
Airtel Airtel Pvt Ltd
BSNL BSNL Public Ltd
Tata Tata Sky Ltd
JP Morgan J.P. Morgan
Southwest United
Alaska Virgin
36 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Reply
Reply
Matt says:
January 15, 2013 at 3:20 pm
You can name a cell range by highlighting it and then typing the name you want to give it
in the cell-reference field above Column A. Excel will know that the name you gave it
refers to the cell range from that point on.
Reply
Ferry says:
January 16, 2013 at 8:33 am
Reply
One note: I worked through these examples, and they did not work at first - until I figured out
that you had created "lst1" and "lst2" as named ranges within the spreadsheet. That may have
been obvious to so some, but I was scratching my head for a while. You may want to mention
37 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
this is NOT helpful. Don't have time to do "homework" while working under deadlines! And - how
do you create a list? Used to know and EASILY access this info in Excel versions prior to 2007,
now everything is renamed and hidden - TERRIBLE new programs :/
Reply
This is a bloody terrible tutorial. It doesn't work for new versions of excel, and is poorly
explained. It is a shame that it comes up in the crappy Bing help search.
Reply
Hui... says:
June 29, 2013 at 4:22 am
@Matt
Having a bad day hey ? (The tutorial doesn't work and Bing is Crappy)
This tutorial works quite well in Excel 2010 and Excel 2013, so you must have a newer
version of Excel than me!
Instead of just slamming it, maybe you could help Chandoo and all of us by telling us what
works and what doesn't. Where abouts does it not work etc
Hui...
Reply
Hi,
38 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Reply
Hui... says:
August 27, 2013 at 5:08 am
@Stefan
Reply
Stefan says:
August 27, 2013 at 6:11 pm
Hi Hui,
Thanks
Stefan
Reply
https://www.dropbox.com/s/a9dcbhk8lpu7glb/Stefan%27s%20sample.xlsx?m
The link
Reply
I am currently performing DAILY updates to a table. The table has 19 columns, and the # of rows
39 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
If possible set up data import as a table. This will automatically extend or remove rows as
needed. If the extra columns are calculations, they will be re-done upon data import.
Reply
I'm comparing two columns. I'm taking each cell from column A (A1, A2, A3, etc...) and using
the ISNA(MATCH function to compare with the entire column of B to see if there is a match. That
is working fine and everything but I just encountered a problem with case-sensitive characters.
For example, cell A4 is Adams dui and in column B there is an Adams DUI. It is indicating that
this is a match when in reality it is not. Do you have another formula that would also check for
case-sensitive characters?
Reply
Matt says:
February 26, 2014 at 12:33 am
You'll have to use COUNTIF, which is case-sensitive in place of MATCH. It will return a 0 if
the item is not found.
A1 = Adams DUI
B1 = adams dui
B2 = Adams dui
B3 = Adams DUI
C1 = COUNTIF(B:B,A1) == 1
A1 = Adams DUI2: C1 == 0
-- Matt
Reply
40 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Matt says:
February 26, 2014 at 7:15 pm
Reply
Matt says:
February 26, 2014 at 7:19 pm
Here's a good use of the MATCH, INDEX, and EXACT functions all combined to make a
rock-solid case-sensitive solution:
http://www.notjustnumbers.co.uk/2013/09/excel-tip-case-sensitive-vlookup.html
Reply
Exact function won't work because it'll only cross-reference the cells in that string. A coworker of
mine found the formula:
{=INDEX(B:B,MATCH(TRUE,EXACT(A2,B:B),0))}
This checks each cell in column A starting with A2 and looks for an exact match in column B. If
there is, it'll populate their name. If there isn't, it'll return a #N/A. If you find all the #N/A's, then
you found all the cells that aren't identical
Reply
Hi,
41 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Reply
Good morning, I am *so close* to my solution but I can't figure out what I'm doing wrong! Hope
you can help me:
I am using =COUNTIF conditional formatting to compare two lists; I want to highlight the values
in List1 that are not in List2. My problem is, I have duplicates I want to keep in List1, and when I
use the formula =COUNTIF(List1,N3)=0 (where N3 is the first cell of List2), SOME of the values
in List1 are highlighted, but some aren't!
For example: In List1 I'll have the value 100332965 repeated in D1, D2, and D3 (where this
value does NOT appear in List2), but only D1 and D2 will have returned the highlighted format,
with D3 unformatted! I am racking my brain to figure out why that would be and I just can't get
it. Any help you could provide would be *much* appreciated!
Reply
Matt says:
August 4, 2014 at 11:42 pm
Without knowing what version you are using, I created two lists and did a conditional
formatting similar to what you are describing.
In each list I had six cells, the first list (A1..A6) I had 123 repeated 3x and 234 repeated
3x. In the second list (B1..B6) I had random numbers, but replacing one with 123.
Then in the Conditional Formatting "Use a Formula..." option, I highlighted all of the the
cells in the first list and then entered =COUNTIF(B$1:B$6,A1)=0. I think your idea is
correct, but you may be reversing the references to your formula. Try reversing your
values and have either =COUNTIF(List2,List1)=0 or =COUNTIF(List2,[first cell of List1])=0
and see if that helps any.
Reply
42 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Hi,
I was using the formula =COUNTIF(firstlist,B1)=0 in order to compare two pretty extensive list of
names. I had named the range for the first list, "firstlist" and name the second list, "secondlist."
The issue was that it would highlight the entire column. Odd, so I went in to compare some
names and noticed that there were repeated names that were still being highlighted even though
they were duplicates. I'm not sure what I am doing wrong.....
The names are also formatted as so: name/location
So, I'm not sure if capitalization had anything to do with it or if the slashes did either. HELP
PLEASE!
Reply
Hi
Suppose I have 04 columns and i want to compare first row of these columns.I want to highlight
a column if the difference between the columns is 02 times greater.
Reply
Hello, Thank you guys for your help. now i have a question.
I use the conditional formatting to compare two lists, not i have to lists of numbers, bank
transaktions. Im trying to find matches. I can do that using countif. Im tring to see which
banktransaktions match eachother, same value, i want the cell to be colours so i know they
match. However, doing it this way is not that good, because, lets say i have the value 200 in one
list. and it apears in the second list i have that value multipule times, then they all get coloured
in/not coloured in depenting on my formula. Now how do i write something so that it only
"registers" the 200 one time. I want to find one match for each value and not multiple.
43 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Reply
Leave a Reply
44 of 45 23/3/21, 12:29 am
Compare 2 lists of Data in Excel - Tutorial & Download Example https://chandoo.org/wp/compare-2-lists-in-excel/
Yes, sign me up %
Free Crash Course 50 ways to analyze data Forum & Community Ebooks & More
Pivot Tables
Power BI
" $ % &
© All rights reserved.
45 of 45 23/3/21, 12:29 am