Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default comparing two columns

I have a number of ids in two columns and am trying to represent which ones
in the second column also appear in the first.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default comparing two columns

One way...

Comparing column B to column A with the list in column A in the range
A1:A20.

=IF(COUNTIF(A$1:A$20,B1),"match","")

Copy down as needed.

--
Biff
Microsoft Excel MVP


"JoeM" wrote in message
...
I have a number of ids in two columns and am trying to represent which ones
in the second column also appear in the first.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default comparing two columns

"T. Valko" wrote...
One way...


And the slow way . . .

Comparing column B to column A with the list in column A in the range
A1:A20.

=IF(COUNTIF(A$1:A$20,B1),"match","")


Bit faster to use

=IF(COUNT(MATCH(B1,A$1:A$20,0)),"match","")

or just

=MATCH(B1,A$1:A$20,0)

which would return a number when there's a match and #N/A when there
isn't.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default comparing two columns

I'm bored too!

--
Biff
Microsoft Excel MVP


"Harlan Grove" wrote in message
...
"T. Valko" wrote...
One way...


And the slow way . . .

Comparing column B to column A with the list in column A in the range
A1:A20.

=IF(COUNTIF(A$1:A$20,B1),"match","")


Bit faster to use

=IF(COUNT(MATCH(B1,A$1:A$20,0)),"match","")

or just

=MATCH(B1,A$1:A$20,0)

which would return a number when there's a match and #N/A when there
isn't.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default comparing two columns

JoeM wrote:
I have a number of ids in two columns and am trying to represent which ones
in the second column also appear in the first.


Assuming your two columns are A and B, select column B and enter this for
conditional formatting:

=COUNTIF($A:$A,B1)0

Select the format you want to "represent" matches.


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default comparing two columns

Apply the formula in C1 which will check the value of B1 in A and return Y or N

=IF(COUNTIF(A:A,B1)0,"Y","N")
--
If this post helps click Yes
---------------
Jacob Skaria


"JoeM" wrote:

I have a number of ids in two columns and am trying to represent which ones
in the second column also appear in the first.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
comparing 3 columns Ukiuki Excel Worksheet Functions 6 September 22nd 08 08:01 AM
comparing columns pads64 Excel Discussion (Misc queries) 1 July 6th 07 08:22 PM
Comparing Columns to each other Sung Excel Discussion (Misc queries) 2 May 25th 07 08:17 PM
Comparing two columns of information with 2 new columns of informa cbuck Excel Discussion (Misc queries) 1 January 16th 07 09:49 PM
comparing columns ~Q Excel Worksheet Functions 1 November 17th 05 07:41 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"