Worksheet boundaries

To obtain the last populated row and last populated column use the following ...

Here's an example showing how to reference this macro ...

Please note that if you have removed the contents of lines these will still be in the mix when it comes to using the macro ... to reset the worksheet boundaries to reflect the current non-blank cells, go to the first cell in the worksheet and save the file.