Related:
- Copy Paste Data from one Worksheet to Another using macros
- Transfer data from one excel worksheet to another automatically - Guide
- How to automatically transfer data between sheets in Excel - Guide
- Tmobile data check - Guide
- Macros in excel download free - Download - Spreadsheets
- Display two columns in data validation list but return only one - Guide
1 response
Ok load a variable with the number of row counts, using a method of XLUP.
Initialize a variable as a Range, and set the last row (your first variable), to have the FOCUS (select) of the Range you created:
Dim lastrow
Dim Range
lastrow=yourworksheetname.Cells(yourworksheetname.Rows.Count, "A").END(xlUp).Row
RANGE = "A1:Z" & lastrow
that will create a range of A1 to Z and what ever your row count was returned as.
Give that a try. I am trying to Remember my last solution from work, and I can post my exact code tomorrow if needed.
Initialize a variable as a Range, and set the last row (your first variable), to have the FOCUS (select) of the Range you created:
Dim lastrow
Dim Range
lastrow=yourworksheetname.Cells(yourworksheetname.Rows.Count, "A").END(xlUp).Row
RANGE = "A1:Z" & lastrow
that will create a range of A1 to Z and what ever your row count was returned as.
Give that a try. I am trying to Remember my last solution from work, and I can post my exact code tomorrow if needed.