View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Check if the same data on another sheet allready exists

leonidas,

Simple. Cut out the step where you use a copy of worksheet(1). Don't use Worksheet(2) - then any
changes to worksheet(1) are incorporated automatically into Worksheet(3) when that macro is run.

HTH,
Bernie
MS Excel MVP


"leonidas" wrote in message
...

Hi,

I have a worksheet(1) with a lot of data in column B (rows 12 to 242,
text as well as numbers) and the user can insert data in column P. When
they are finished they press a button and a copy of worksheet(1) will be
made. On the copy of worksheet(1), worksheet(2), the user can add rows
with new data in column B (the existing data won't change) and also
insert data in column P. After finalizing worksheet(2) and by pressing
a button a résumé will be made. This is a new worksheet, worksheet(3).
All data from worksheet(1) column B and column P are copied to this new
worksheet(3).
But now the tricky part.
When the user has added a new row in worksheet(2) it has not changed in
worksheet(1). So there should be a check if all the data in worksheet(2)
column B also exists in worksheet(3) column B. When the data doesn't
exist it should be inserted in the same place as it is in worksheet(2)
column B. The only problem is I don't know how to do this.
Can someone help me with this problem? Thanks in advance!


--
leonidas
------------------------------------------------------------------------
leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
View this thread: http://www.excelforum.com/showthread...hreadid=567483