ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   comparing side-by-side lists (https://www.excelbanter.com/excel-programming/358326-comparing-side-side-lists.html)

petevang[_4_]

comparing side-by-side lists
 

I have two lists only containing numbers in columns A and B. How can I
see which cells are not in Column B that are in Column A? For
Example:

Cloumn A Column B
1 1
2 2
3 4
4 6
5 7
6 8
7 9
8
9
10

Is there a way that I can have excel return the missing values from
column B (3,5,10)

Thanks


--
petevang
------------------------------------------------------------------------
petevang's Profile: http://www.excelforum.com/member.php...o&userid=25034
View this thread: http://www.excelforum.com/showthread...hreadid=530926


Tom Ogilvy

comparing side-by-side lists
 
=countif(B:B,A1)

in C1, then drag fill down the column. Apply an autofilter to column C and
select 0 in the dropdown

--
Regards,
Tom Ogilvy


"petevang" wrote:


I have two lists only containing numbers in columns A and B. How can I
see which cells are not in Column B that are in Column A? For
Example:

Cloumn A Column B
1 1
2 2
3 4
4 6
5 7
6 8
7 9
8
9
10

Is there a way that I can have excel return the missing values from
column B (3,5,10)

Thanks


--
petevang
------------------------------------------------------------------------
petevang's Profile: http://www.excelforum.com/member.php...o&userid=25034
View this thread: http://www.excelforum.com/showthread...hreadid=530926



Gerencsér Gábor

comparing side-by-side lists
 
Assuming the two columns have no empty cells in the range of interest, the
following should work, by marking the 'lonely' cells red in ColA.
This works with numbers only, not with strings.

Sub MarkMissed()

Range("A1").Select

Do Until ActiveCell = Empty
arow = ActiveCell.Row
Match = False

Do Until ActiveCell.Offset(1 - arow, 1) = Empty

If ActiveCell.Offset(1 - arow, 1) = ActiveCell Then
Match = True
Else
End If

arow = arow - 1

Loop

If Match = False Then
Selection.Interior.ColorIndex = 3
End If

ActiveCell.Offset(1, 0).Select

Loop

End Sub


Cheers, Gabor

"petevang" az
alábbiakat írta a következő hírüzenetben:
...

I have two lists only containing numbers in columns A and B. How can I
see which cells are not in Column B that are in Column A? For
Example:

Cloumn A Column B
1 1
2 2
3 4
4 6
5 7
6 8
7 9
8
9
10

Is there a way that I can have excel return the missing values from
column B (3,5,10)

Thanks


--
petevang
------------------------------------------------------------------------
petevang's Profile:
http://www.excelforum.com/member.php...o&userid=25034
View this thread: http://www.excelforum.com/showthread...hreadid=530926





All times are GMT +1. The time now is 11:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com