Johnny C
Well-known Member
- Joined
- Nov 7, 2006
- Messages
- 1,069
- Office Version
- 365
- Platform
- Windows
Hi.
I've inherited a spreadsheet that is generated from MS Dynamics (I think). There's about 300 rows. There's a macro that needs to amend something, looping down the rows to the last used row takes forever. The Last used row is the bottom of the sheet (row 1048576
I tried the usual, deleting rows, goto A1, save. But that didn't work. I tried various suggestions but narrowed it down to the fast that the Activesheet.UsedRange property only refers to columns, $A:$J. I'm assuming that's because it's somehow imported, I've never seen a sheet before with no row in the UsedRange property.
You can't set the UsedRange property. I could get round it by working out where the data stopped, copying the data elsewhere, deleting the columns, copying the data back but that won't work if there's links to the original data, you'll end with a load of #REFs.
Is there a way I can fix it in situ?
I can't do a one off fix as there are hundreds of files in the same boat.
Cheers
I've inherited a spreadsheet that is generated from MS Dynamics (I think). There's about 300 rows. There's a macro that needs to amend something, looping down the rows to the last used row takes forever. The Last used row is the bottom of the sheet (row 1048576
I tried the usual, deleting rows, goto A1, save. But that didn't work. I tried various suggestions but narrowed it down to the fast that the Activesheet.UsedRange property only refers to columns, $A:$J. I'm assuming that's because it's somehow imported, I've never seen a sheet before with no row in the UsedRange property.
You can't set the UsedRange property. I could get round it by working out where the data stopped, copying the data elsewhere, deleting the columns, copying the data back but that won't work if there's links to the original data, you'll end with a load of #REFs.
Is there a way I can fix it in situ?
I can't do a one off fix as there are hundreds of files in the same boat.
Cheers