I'm new to VBA and stuck on an issue defining the "last row". I defined the last row as the following: LastRow = Cells(Row.Count,1).End(xlUp).Row. I reference this variable multiple times in the same Sub across different worksheets but it only works the first time on the first worksheet. I've found that redefining the LastRow before the second reference works but I'm wondering how I could change the code such that I don't need to define it twice in the same Sub.
Bookmarks