Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 120
Default Compare two cells in two different files and return answer

Hi
Try this

=IF(SUMPRODUCT(--([Book1]Sheet1!$A$2:$A$4=A2),--([Book1]Sheet1!$B$2:$B$4=B2)),"Yes","No")

Bear in mind that your range need to be the same,eg the range A2 to A4 in
Sheet1 of Book1 must be the same in Sheet1 of Book2, ie A2 to A4, otherwise
you will get error message
--
Hope this help

Pls click the Yes button below if this post provide answer you have asked

Thank You

cheers, francis





"Doug" wrote:

I am attempting to compare two text cells and if they both exist, I want to
bring in a "yes" answer. If they don't, bring in a "no" answer. Here's an
example of text.

File 1
Col A Col B
BRATTA ZPB_COMMON
AHERNC ZPB_COMMON
GENCABH ZPB_COMMON

File 2
Col A Col B
BRATTA ZPB_COMMON
AHERNC ZPB_COMMON
GENCABH

So, what I want to do is say in File 1 take cells A1 and B1 compare them to
File 2 and search Col A and Col B and if there is an exact match somewhere
in file 2 then return a "yes" in column C. If not, "no" in column C.

So, file 2 would look like this:
File 2
Col A Col B Col C
BRATTA ZPB_COMMON Yes
AHERNC ZPB_COMMON Yes
GENCABH No


Thanks in advance for any help.


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 Value in Cell 1 to a List, Return Value if Match otherwise Return Null Ben Excel Discussion (Misc queries) 2 March 15th 07 01:02 AM
Compare two cells and return certain value in third cell hurairah Excel Worksheet Functions 3 July 19th 06 03:44 AM
Compare 2 columns and choose one and enter answer in third column Betsy Excel Worksheet Functions 1 June 30th 06 06:17 PM
Is there a way to compare two excel files for repetitious cells? D. Thompson Excel Worksheet Functions 1 December 28th 05 08:12 PM
Return answer if..... Pat Excel Worksheet Functions 3 March 8th 05 10:52 PM


All times are GMT +1. The time now is 03:12 AM.

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

About Us

"It's about Microsoft Excel"