![]() |
|
|
|
#1
|
|||
|
|||
|
The attached file has the code implemented for the various sheets. However for some odd reason it hangs (eventually finishes) on Fill 1. Why is that ?
/Møller |
|
#2
|
||||
|
||||
|
Ah yes, that's because the code's using the equivalent of selecting cell B3 on the source sheet then on the keyboard, pressing End then down arrow, which with that source sheet with just a single line of data on row 3, was going right to the bottom of the sheet hence the long time taken. I've updated the code in several ways, principally to do the same from B2 instead of B3, but also, in case there are no lines of data at all, I've capped the number of rows it'll process to 10,000. I've also reduced the amount of code significantly.
See attached. |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Find if Date range falls within another range
|
Triadragon | Excel | 3 | 05-02-2016 11:48 AM |
Name a Range in a Word Document and then copy that range to the end of the doc w button click
|
DanNatCorning | Word VBA | 1 | 04-29-2016 10:47 PM |
| How to create vlookup formula range R1C1 using VBA | jyfuller | Excel Programming | 0 | 04-29-2015 12:03 PM |
Help using If and Vlookup
|
heastlund | Excel | 3 | 08-04-2014 01:34 PM |
| VLOOKUP looking at another cell for its range | Rich18144 | Excel | 1 | 06-24-2014 07:56 AM |