Written by Allen Wyatt (last updated June 28, 2025)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365
David notes that when copying multiple columns (say, 10) by several hundred thousand rows, it understandably takes a while for Excel to pull it all into the Clipboard. He usually gets flashes of data on the screen, and the occasional "not responding" message, but it usually will copy without crashing. When he then tries to paste after 10 to 20 seconds, he finds that Excel's not finished copying. David wonders if there is a way to KNOW when the copy is completed so he knows it is safe to paste. A message such as "copy complete" would be helpful in these situations.
When you use Ctrl+C to copy a huge amount of data, when the copy is complete, the status bar should display this: "Select destination and press ENTER or choose Paste." Of course, if you wait long enough, the message will disappear and you may be left to wonder whether the copy has completed or not.
You can, however, do the copy using a macro, and the macro can display a message when the copy is complete. Here is a very simple example:
Sub ReportCopy() Selection.Copy MsgBox "copy complete" End Sub
Make your selection, run the macro, and when the copy has been made, then the information is within the Clipboard, ready to be pasted.
When using any copying that involves the Clipboard, you need to understand that the process is inherently slow, particularly if you don't have a lot of memory within your PC. If what you are copying requires more memory than what is available on your system, then Windows uses virtual memory, which means it writes some of the information to your drive's cache. This slows things down even more.
You can, if desired, do both the copy and paste within a macro, which bypasses the Clipboard completely. Here's an example of such an approach:
Sub Rnge_Copy() Dim LeftEdge As Long Dim RightEdge As Long Dim TopEdge As Long Dim BottomEdge As Long Dim DestRnge As Range TopEdge = ActiveCell.Row LeftEdge = ActiveCell.Column BottomEdge = TopEdge + Selection.Rows.Count - 1 RightEdge = LeftEdge + Selection.Columns.Count - 1 On Error Resume Next Set DestRnge = InputBox("Enter the top left destination cell address", Type:=8) If Err.Number = 0 Then Range(Cells(TopEdge, LeftEdge), Cells(BottomEdge, RightEdge)).Copy _ Destination:=DestRnge End If On Error GoTo 0 End Sub
To use the macro, select the range you want to copy and then run it. You are asked to provide an address for the upper-left corner of the destination. (The macro copies information within the same worksheet, not between worksheets or workbooks.) The error handling in the macro is in place in case the user provides an invalid destination address or clicks on the Cancel button.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11566) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!
When you want to remove information from a worksheet, you can either clear cells or delete cells. This tip examines the ...
Discover MoreWhen you are working on a worksheet (particularly a large one), you may want to search for and possibly copy information ...
Discover MoreWhen you enter data in a worksheet, Excel tries to figure out what type of data you are entering and treat the entry ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2025-07-02 10:48:00
J. Woolley
I believe the Tip's Rnge_Copy macro is intended to copy the currently selected range (Selection) to a new destination; however, it has two problems:
1. It assumes ActiveCell is at the top-left corner of Selection, which is usually true but not necessarily so.
2. It uses VBA's InputBox function, which does not support Type, instead of Excel's Application.InputBox method, which does.
Here's an improved version of the macro:
Sub Rnge_Copy2()
Dim DestRnge As Range, msg As String
msg = "Select the top-left cell of the destination on any worksheet," _
& vbLf & "OR enter its address here:"
On Error Resume Next
Set DestRnge = Application.InputBox(msg, , ActiveCell.Address, Type:=8)
If Err.Number = 0 Then Selection.Copy Destination:=DestRnge
On Error GoTo 0
End Sub
Notice the destination can be on any worksheet, even if it is in another workbook, and it can be selected using your pointing device (e.g., mouse). When the destination is specified, the Copy method replaces the destination's previous content without warning and without using the clipboard.
2025-06-29 07:57:00
zeddy
When Excel is processing vba code it's aim is to get to the end of the routine as fast as possible. For complex operations, particularly those involving many screen updates, it can often start processes before previous ones have completed. You cannot assume that all processing has been completed before you display such a "completed" message.
To ensure that Excel has actually finished something before proceeding with the next line of vba code, you need to include the following line of code directly before your "display finished message" line of code:
DoEvents
..this line of code effectively tells Excel to finish all previous tasks BEFORE proceeding to the next line of code.
Excel vba processing is like the Terminator, it is relentless and will not stop till it gets to the End Sub
You can make it stop to catch it's breath and finish all previous tasks before proceeding to the next line of code using DoEvents.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments