Morning,
So the xlLastCell in the following code is still counting the last row of data prior to being deleted (hence the dynamic range).
I found that the LastRow still seems to work as expected
However I am at a loss how I force this into the dynamic range so it uses this and not the'phantom' range that existed prior to the data being deleted and resized.
I am using datasets in excess of 180,000 rows therefore I need to find a way to make it work and can then apply to other reports also.
As always thanks in advance.
Stuart
So the xlLastCell in the following code is still counting the last row of data prior to being deleted (hence the dynamic range).
Code:
Set StartPoint = Data_sht.Range("A1")
Set DataRange = Data_sht.Range(StartPoint, StartPoint.SpecialCells(xlLastCell))
NewRange = Data_sht.Name & "!" & _
DataRange.Address(ReferenceStyle:=xlR1C1)
I found that the LastRow still seems to work as expected
Code:
x = Data_sht.Cells(Rows.Count, "A").End(xlUp).Row
I am using datasets in excess of 180,000 rows therefore I need to find a way to make it work and can then apply to other reports also.
As always thanks in advance.
Stuart