By using the following I get the row and column number of the "last" cell with contents:'
I then need to use this information to copy the range starting in cell A1 and ending in the row and column found above. But this has turned out to cause me some trouble.
Can anyone help?
/Soren
Code:
lastrow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Row
lastcolumn = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
I then need to use this information to copy the range starting in cell A1 and ending in the row and column found above. But this has turned out to cause me some trouble.
Can anyone help?
/Soren