You have given me a very difficult task. It is just like writing a book on excel VBA and let me tell you that I am not very good in writing.

But I will try my best to explain. If it is still unclear to you, better you go through some online tutorials on excel VBA. Just Google each line of code and you will get plenty of material to read.
1. If Target.Count > 1 Then Exit Sub : This line makes sure that if more than one cells are changed at once, the code will not execute.
2. If Target.Column = 2 Then: The code for worksheet change event will execute only if the value of any cell in col. B is changed. 2 is the column index for col. B.
3. Application.EnableEvents = False: During the execution of the code, it may happen that the value of some cells in col. B are changed and as a result the code will re-execute since as per the code when value of any cell in col. B is changed, the code will be triggered. So to stop the re-execution of the code due to change in values in the target range during the code.
4. If Target <> "" And Left(Target.Offset(-2, 0), 7) = "PROJECT" Then: So lets assume that the value of a cell in col. B gets changed, which triggers the code, this line of code checks if value of the target cell is not blank (this also stops code execution if you delete the cell content in the target range) and checks if the first 7 characters form the string in two cell above the target cell is "PROJECT". Take an example. If you change the value of B7, the code will execute and it will first make sure that you have entered a value in B7 and then checks B5 (two cells above the target cell B7) and if it finds that the left 7 characters in B5 are Project then the control is passed to the next line of code. Suppose you change the value of B8, then code will check left 7 characters of B6 and it doesn't find Project as left 7 characters of B6 so the code doesn't do anything.
5. lr = Cells(Rows.Count, 2).End(xlUp).Row: This line of code finds the last used row in col. B. You have to memorize this line of code as it is required in most of the VBA code. For more detail, Google Cells(Rows.Count, 2).End(xlUp).Row to find more material on this.
Sorry If I have not explained it well.
Bookmarks