This is a similar question to that I wrote in this thread but whereas I referred in it to a cell's contents, this now has to do with the cell's location.
If in a macro you have a line referencing to a cell, for example:
Cells(19, 5).Value = "100"
and then you insert a row above that cell, now the macro will place he value "100" in cell(20,5) instead. Is there an alternative way to write the macro so that you don't need to change the cell's col/row references in these cases? It's a pain in the neck and a source of errors when you have a large amount of references to manually update.




Reply With Quote