close

I need to compare two lists and if there is a match then copy some cell
from one list to other otherwise do nothing. I need to put this in a
macro which is doing a whole bunch of other things.

So...I have sheet1 with column A,B,C,D,E,F,G,H Sheet2 with column
A,B,C,D,E,F,G,H. Now compare the values in each cell of column A in
sheet1 with value in each cell of column A in sheet2. If there is a
match, copy value from cell in same row and column H of sheet2 to same
row column H of sheet1... if no match then leave the original value in
sheet1.

Can it be done? I was trying
=IF(MATCH(A2,Dummy1!$A$2:$A$533,0)lt;gt;quot;#N/Aquot;,VLOOKUP(A2,Dummy1!$A$2:$H$533,8,FALSE),I8)

but this doesn't give any promising results and I don't know how to
leave the original value that was there in original cell and this
wouldn't work in a macro.......I need to put something in a macro.

Thanks, Jay--
sa02000
------------------------------------------------------------------------
sa02000's Profile: www.excelforum.com/member.php...oamp;userid=27747
View this thread: www.excelforum.com/showthread...hreadid=538417Perhaps a trip to vba help index for FINDNEXT will be of help?

--
Don Guillett
SalesAid Software

quot;sa02000quot; gt; wrote in
message ...
gt;
gt; I need to compare two lists and if there is a match then copy some cell
gt; from one list to other otherwise do nothing. I need to put this in a
gt; macro which is doing a whole bunch of other things.
gt;
gt; So...I have sheet1 with column A,B,C,D,E,F,G,H Sheet2 with column
gt; A,B,C,D,E,F,G,H. Now compare the values in each cell of column A in
gt; sheet1 with value in each cell of column A in sheet2. If there is a
gt; match, copy value from cell in same row and column H of sheet2 to same
gt; row column H of sheet1... if no match then leave the original value in
gt; sheet1.
gt;
gt; Can it be done? I was trying
gt; =IF(MATCH(A2,Dummy1!$A$2:$A$533,0)lt;gt;quot;#N/Aquot;,VLOOKUP(A2,Dummy1!$A$2:$H$533,8,FALSE),I8)
gt;
gt; but this doesn't give any promising results and I don't know how to
gt; leave the original value that was there in original cell and this
gt; wouldn't work in a macro.......I need to put something in a macro.
gt;
gt; Thanks, Jay
gt;
gt;
gt; --
gt; sa02000
gt; ------------------------------------------------------------------------
gt; sa02000's Profile:
gt; www.excelforum.com/member.php...oamp;userid=27747
gt; View this thread: www.excelforum.com/showthread...hreadid=538417
gt;

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

    software

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