ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check if the same data on another sheet allready exists (https://www.excelbanter.com/excel-programming/369135-check-if-same-data-another-sheet-allready-exists.html)

leonidas[_60_]

Check if the same data on another sheet allready exists
 

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


Bernie Deitrick

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




leonidas[_61_]

Check if the same data on another sheet allready exists
 

Hi Bernie,

Sorry, but I think my explanation was to simple. The copy o
worksheet(1), worksheet(2), is a necessary step in the proces, becaus
both worksheets are used by another user. Also the difference betwee
both worksheets should be visible.
I hope you of someone else can still help me. Thanks in advance

--
leonida
-----------------------------------------------------------------------
leonidas's Profile: http://www.excelforum.com/member.php...fo&userid=3537
View this thread: http://www.excelforum.com/showthread.php?threadid=56748



All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com