Most importantly, it does not need to select a cell anymore. The recommended solution is shown in the following function AutoFillTable2:ĪutoFillTable2 differs in two important ways from its predecessor: Therefore, the function needs to select each cell that is manipulated so that Excel knows which cell to copy from and into which cell it should paste. The function pastes the clipboard content into every subsequent empty cell.ĪutoFillTable uses the clipboard to copy the cell content. If it finds a cell that is not empty, it copies the cell content to the clipboard. The function moves over all cells in the range. This function opens an input box that asks the user to specify a cell range. ![]() ![]() Set iRange = Application.InputBox(prompt:="Enter range", Type:=8) ![]() Let's take a look at the following simple macro AutoFillTable: MSDN: Improving Performance in Excel 2007: "Reference Excel objects such as Range objects directly, without selecting or activating them" (in the section, "Faster VBA Macros").Įxample: How to avoid the usage of the. Office blog: "What is the fastest way to scan a large range in Excel?" ![]() Select statement in VBA code to improve performance:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |