Hello again
I still cannot get the workbook to behave as intended.
I also see that I have been to inaccurate in describing what I want the code to perform. I appologize and will now try to explain the scenario more accurate. Some changes have been done as to my former description.
THIS IS THE PROJECT:
The
Location ID's is to be
the same all the time (A.1.1, A.2.1, etc) as set up in Sheet 1 (Lokasjon). These Location ID's is also listed in the last column of Sheet 2, in order to use a list Function in this sheet.
The
Item numbers in column A Sheet 2 ( 40032, 40033, 40045 etc)
will be changed (old ones deleted and new ones adding). This the users will do by deleting or inserting the entire row in Sheet 2.
------------------------------------------------
What I want the code to do:
1.
New Location ID registrations in Sheet 2 shall look in the same row, column A and register this unik Item number in sheet 1 in the first free cell MAT1, MAT2, MAT3 or MAT4 under the Location ID. Also the date of the last registration in these cells must register in the DATE cell.
2.
Also when the Location ID entries in sheet 2 is deleted, the system must behave as described over but now delete the unike Item number in Sheet 1, without changing the DATE. I guess in order to handle this that when an Item number and the entire row is to be deleted (as described in "THIS IS THE PROJECT") the system must not accept this deletion except the entire row to the right of the Itemnumber is empty.
3.
When a Location ID registration in a cell in sheet 2 is changed to a new Location ID, the system must delete the former Item number allocated to the Location ID in Sheet 1
without changing the DATE, and register the Item number under the new Location ID
with a change in the allocated DATE cell.
So no deletions is to be registered in the DATE cell, only the DATE of the new Item number registrations.
Also I do not want the text: "You have changed the value..." to pop up When I change a Location Id (A.1.1, A.1.2 etc.) in Sheet 2. I know that this text comes from the code, but I am actually so new to this that I cannot find out of this on my own.
Can I ask you to take a look in the attachment and make the appropriate changes directly in the code ? Hope it is not to much to ask for...