Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default don't allow row to be copied twice

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
--
Learning
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default don't allow row to be copied twice

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




tracktraining wrote:

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
--
Learning


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default don't allow row to be copied twice

THANKS SO MUCH Again. I will give that a try tomorrow.

- tracktraining
--
Learning


"Dave Peterson" wrote:

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




tracktraining wrote:

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
--
Learning


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copied formula produces unexpected copied results Robert New Users to Excel 1 December 5th 08 04:11 PM
Forum copied Satti Charvak Excel Worksheet Functions 2 November 7th 08 02:47 PM
In a copied file, JnKBarry Excel Discussion (Misc queries) 1 April 17th 08 03:36 PM
Copied workbooks Wheat Country Excel Discussion (Misc queries) 1 August 5th 06 12:03 AM
Why my cell format is not copied when I copied workbook? courtesio99[_28_] Excel Programming 0 January 9th 04 07:03 AM


All times are GMT +1. The time now is 05:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"