Hi,
Not sure exactly what you're looking for, but maybe this will help. The code below uses the "CountA" function to check how many cells in the specified range have data in them (using A1:A10, but could be any range), and then copies that number of cells from worksheet1 to worksheet2. This will only work if the data is continuous (no blank cells in between the data).
On worksheet1, put some numbers in cells A1:A5, for instance...
Sub DynamicRange()
Dim CountA_Range As Range, intCountA_Result As Integer, CopyRange As Range
Set CountA_Range = Worksheets(1).Range("A1:A10")
intCountA_Result = WorksheetFunction.CountA(CountA_Range)
Set CopyRange = ThisWorkbook.Worksheets(1).Rows("1:" & intCountA_Result)
CopyRange.Copy
Worksheets(2).Rows("1").PasteSpecial (xlPasteValues)
End Sub