don't allow row to be copied twice

T

tracktraining

Hi All,

Is there a way for me to not allow the same row to be copy over to another
sheet twice?

any suggestion is much appreciated!


thanks,
tracktraining
 
D

Dave Peterson

Can you pick out a key value that appears exactly once if the row was copied to
the other sheet.

If yes, you can use application.match() to look to see if it's already there.

Dim myCell as range
dim LookUpRng as range
dim res as variant 'could be an error

set mycell = worksheets("sheet999").range("x932")

with worksheets("sheetthat'scopiedto")
set lookuprng = .range("X:x")
end with

res = application.match(mycell.value, lookuprng, 0)

if iserror(res) then
'not there, do the copy|paste
else
'already there, skip it or merge the data nicely????
end if
 
Top