Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim Kim is offline
external usenet poster
 
Posts: 284
Default compare data in two columns

What is the correct formula to use to compare data in column A to see if
there is a match in column B. In column C, just return the value in column A
if there is a match anywhere in column B, otherwise leave blank.
Col A Col B Col C
1234 5555
4321 3457
5555 3241 5555
5241 2319
3457 5361 3457

I have tried Vlookup, If statements, and a few others, but can't seems to
get the correct format. Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default compare data in two columns

=IF(COUNTIF($B$1:$B$5,A1),A1,"")


"Kim" wrote:

What is the correct formula to use to compare data in column A to see if
there is a match in column B. In column C, just return the value in column A
if there is a match anywhere in column B, otherwise leave blank.
Col A Col B Col C
1234 5555
4321 3457
5555 3241 5555
5241 2319
3457 5361 3457

I have tried Vlookup, If statements, and a few others, but can't seems to
get the correct format. Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim Kim is offline
external usenet poster
 
Posts: 284
Default compare data in two columns

Thank you, teethless, it worked!


"Teethless mama" wrote:

=IF(COUNTIF($B$1:$B$5,A1),A1,"")


"Kim" wrote:

What is the correct formula to use to compare data in column A to see if
there is a match in column B. In column C, just return the value in column A
if there is a match anywhere in column B, otherwise leave blank.
Col A Col B Col C
1234 5555
4321 3457
5555 3241 5555
5241 2319
3457 5361 3457

I have tried Vlookup, If statements, and a few others, but can't seems to
get the correct format. Thank you.

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
Compare data in two columns excellearn2006 Excel Worksheet Functions 2 August 17th 06 11:13 PM
compare data from 2 columns micmed Excel Worksheet Functions 3 February 13th 06 02:53 AM
Need to compare data in 2 columns and not sure how. Stacey Charts and Charting in Excel 0 February 8th 06 04:47 PM
Macro to compare two columns of data Odawg Excel Discussion (Misc queries) 0 October 12th 05 03:13 AM
Trying to compare data in two columns... accessgrits Excel Worksheet Functions 5 May 12th 05 06:32 PM


All times are GMT +1. The time now is 10:13 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"