don't allow row to be copied twice

  • Thread starter Thread starter tracktraining
  • Start date Start date
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
 
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
 
THANKS SO MUCH Again. I will give that a try tomorrow.

- tracktraining
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top