Dan,
not sure if you specifically want to use VBA to do this...but you ca
use a formula.
Assume that in Sheet 1 column A you have a range of numbers and Sheet
column D you have a range of numbers. If I understand, based on th
value in a cell in column A, you want to copy the value in column D o
that same row, to sheet 2 and place on (in column D ??) on the same ro
as the cell in sheet 2 column A having the same number as sheet1 colum
A.
kind of wordy...but right?
you can use this formula:
=SUMPRODUCT(--(EXACT(Sheet1!$A$1:$A$30,$A1)),Sheet1!$D$1:$D$30)
if sheet 1 cols A and D are populated..and column A sheet 2 i
populated, then all you need to do is copy this formula into col D o
sheet 2 and copy down.
you may need to adjust the searched range (ie. $A$1:$A$30 and $D1:$D30
to fit your data.
this worked fine for me when I tested it, however on a side note if
cell in sheet 2 col A matches more than one cell in sheet 1 col A, thi
formula will sum those two numbers together and place them in sheet
col D.
HT
--
Cel
-----------------------------------------------------------------------
Celt's Profile:
http://www.excelforum.com/member.php...fo&userid=1941
View this thread:
http://www.excelforum.com/showthread.php?threadid=55332