close

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: www.excelforum.com/member.php...oamp;userid=32183
View this thread: www.excelforum.com/showthread...hreadid=519297Jonas,

For the first part, something along the lines of

=IF(A2=quot;quot;,quot;quot;,IF(ISERROR(MATCH(CellwithValue to Match,DataBase2Column,False)),quot;Noquot;,quot;Yesquot;))

like:

=IF(A2=quot;quot;,quot;quot;,IF(ISERROR(MATCH(A2,Sheet2!$A$1:$A$10 00,FALSE)),quot;Noquot;,quot;Yesquot;))

For the second part:

=IF(A2=quot;quot;,quot;quot;,IF(ISERROR(MATCH(A2,Sheet2!$A$1:$A$10 000,FALSE)),quot;quot;,INDEX(Sheet2!$B$1:$B$1000,MATCH(A2, Sheet2!$A$1:$A$1000,FALSE))))

HTH,
Bernie
MS Excel MVPquot;jonas.ornborgquot; gt; wrote in message
news:jonas.ornborg.2490xm_1141649703.2903@excelfor um-nospam.com...
gt;
gt; Hello,
gt; I would like to write a worksheet function which compare the contents
gt; in two
gt; cell from a database1 with the contents in two columne in database2.
gt; Whenever there is a match I would like it to return a a prespecified
gt; text
gt; (i.e Yes or No) and a value from database2 associated with the found
gt; match in different cells of database1.
gt;
gt; Empty cells in database1 (in one or both the cells where comparasions
gt; values
gt; are found) also needs to be considered as no comparasion should be made
gt; (i.e.
gt; do not return the text Yes/No for the first match with any empty cell
gt; in
gt; database2).
gt;
gt; Anyone that has suggestions?
gt;
gt; Kind regards
gt; Jonas
gt;
gt;
gt; --
gt; jonas.ornborg
gt; ------------------------------------------------------------------------
gt; jonas.ornborg's Profile: www.excelforum.com/member.php...oamp;userid=32183
gt; View this thread: www.excelforum.com/showthread...hreadid=519297
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()