After thinking about it, the Worksheet_Change event (plus RestoreFormulas sub) took the form of:
Some comments.
1. The formula in column B has changed, as it did not provide for two characters if you selected item #10 in column D.
2. I changed the formula text in column G to be a little simpler. The formula should be improved by changing ??? to the correct text (applies when item #10 is selected in column D). Similarly, you should create formulas in column Q.
3. I changed the content of the Timestamp function to:
The Format function used earlier (Timestamp = Format(Now,"dd-mm-yyyy") ) caused that text resembling a date was inserted into the cell, not the date as a number. If in a cell you want to see a date format other than your system's, the format should be forced in the cell, not in the function!
4. If the H column is to contain the date at the time the record was entered, I think that the Timestamp function should not be used in it. This macro should insert the current date. Let me give you an example. If you have a record in the table where column H is earlier than the current date, changing the value in column C will convert the Timestamp function and insert the current date. And it should be unchangeable.
The task may seem easy, but things get complicated when the user does not act according to our expectations. We are not able to predict all his behaviors on the sheet.
Artik
Bookmarks