Side note, comments should say
why not
what -
LastRowData
and
LastColumnData
are very good identifiers already, their respective comments tell nothing that the variable names don't already say - I'd remove them. Also your code looks like it can use a peer review - feel free to come over and post your
working code to
Code Review for help making your code more efficient and easier to read and maintain. (e.g.
Worksheets.Add
returns a worksheet reference, you should be using it instead of referring to
ActiveSheet
on the next line). —
Mat's Mug 27 secs ago