input:
45311
0003ML00030-1 0003ML00030-2 0003ML00030-3
0003ML00030-1 0003ML00030-1
See my snap highlighted area need to select, Last cell some times Blank and Also dynamic.
From the Above input, need to select All data and copy it. When i reuse the sheet The Data Range may vary, at the time standard formula not working properly.
Currently i use this VBA code.
Sub Macro()
Sheets("input").Select
Range("D2").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Copy
End Sub
When i use this code it select Extreme last cell (row 1048570 x col 41).
But in this case Last cell is (row4 x col7) like this way i need to select Dynamically if Data range vary