Hi Bill
First could you edit your post, select the code and click on the "#" icon to put code markers on it, like I've done below.
Now you need to learn a little VBA
The above code creates a variable named LastRowN which is a number.
Then the next line goes to the last row in the worksheet (something like row 64,000 and in column "N")
It then does a Ctrl UP arrow and stops when it hits a non blank cell. Then it sends back the ROW that is in.
Now you can change your code using this variable by changing these two lines above..
Instead of
use
And for the
use
This is what us programmers do after we record a macro using the recorder. Then we change the last row to a variable and use it in the slightly modified code.
Another approach would be to use Dynamic Named Ranges in the code. For more about them read...
http://www.ozgrid.com/Excel/DynamicRanges.htm or
http://www.bettersolutions.com/excel...G820716330.htm
Bookmarks