|OK, you've added a little more complexity than your original "A5" based question. What you want can be done, but we need a few more details.|
First: The task will be much easier if the insertion of rows is based a number, not a text string. e.g. 7 is lot easier to deal with than Qty.7 Unless you can guarantee that the text string will always follow a set pattern, the code may have trouble extracting the value needed to insert the rows. For example if the string is always "Qty." with the number following the ".", then we can write code to look for that. However, here is where issues could occur:
In your OP, you used this string: 'QTY. 5". Note the space after the ".". In Response #2 you used "QTY.5". No space. that is the type of thing that can cause errors.
Second: After the rows are inserted based on the number entered in Column A, will you be entering values in those blank cells in Column A? The reason I ask is this: The code is going to monitor Column A for changes. When it sees a change to Column A, it is going to look for a number to use (or extract) and then insert rows based on that number. If you are going to be entering data in Column A that should not be used to insert rows, we have to let the code know that. In other words, the code can't think and it certainly can't read the user's mind, so it has to be told how to recognize what data to use to insert rows and what data to ignore. What can you tell us about what will happen in Column A once the Rows are inserted?
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.