Jonas,
For the first part, something along the lines of
=IF(A2="","",IF(ISERROR(MATCH(CellwithValue to Match,DataBase2Column,False)),"No","Yes"))
like:
=IF(A2="","",IF(ISERROR(MATCH(A2,Sheet2!$A$1:$A$10 00,FALSE)),"No","Yes"))
For the second part:
=IF(A2="","",IF(ISERROR(MATCH(A2,Sheet2!$A$1:$A$10 000,FALSE)),"",INDEX(Sheet2!$B$1:$B$1000,MATCH(A2, Sheet2!$A$1:$A$1000,FALSE))))
HTH,
Bernie
MS Excel MVP
"jonas.ornborg" wrote in message
news:jonas.ornborg.2490xm_1141649703.2903@excelfor um-nospam.com...
Hello,
I would like to write a worksheet function which compare the contents
in two
cell from a database1 with the contents in two columne in database2.
Whenever there is a match I would like it to return a a prespecified
text
(i.e Yes or No) and a value from database2 associated with the found
match in different cells of database1.
Empty cells in database1 (in one or both the cells where comparasions
values
are found) also needs to be considered as no comparasion should be made
(i.e.
do not return the text Yes/No for the first match with any empty cell
in
database2).
Anyone that has suggestions?
Kind regards
Jonas
--
jonas.ornborg
------------------------------------------------------------------------
jonas.ornborg's Profile: http://www.excelforum.com/member.php...o&userid=32183
View this thread: http://www.excelforum.com/showthread...hreadid=519297