Hi all, I will give you the code first and then the problem.
The problem I'm having is I need to copy the last 24 months of data. I can run a Do While Loop to run from 24 months ago until now but with just short of 1000 cells to copy, the loop not only takes a while, but I feel like I might have a siezure watching the copy and paste process. Is there a way to select all the cells at once, from the last cell in the row to the cell at position -24?Application.Worksheets(1).Select ActiveCell.End(xlToRight).Select ActiveCell.Offset(0,-24).Select
If more is needed, I'll try to accommodate.
Thank you.
Last edited by Mordred; 07-20-2010 at 02:02 PM.
To grab all cells at once:
Activecell.End(xlToRight).Offset(,-23).Resize(,24).Copy
To reduce risk of siezures:
Application.ScreenUpdating = False ....code ....code ....code Application.ScreenUpdating = True
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Thank you JBeaucaire, it worked like a charm. And thank you for reducing my risk of siezure![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks