VBA - Write after the last row with content

excelactuary

New Member
Joined
Feb 18, 2013
Messages
45
Hello,

I have code which generates table blocks of different sizes. You have for instance blocks in the following ranges:

D19:F45; H19:J31; L19:N36

I am writing a loop which generates blocks underneath the 3 blocks stated above. If I wouldn't know how big the three blocks are and I would want to leave a blank row between the blocks and start to write the next series of in row 47 (because the cell F45 is at the bottom and I want a blank row), how would I do this? I didn't manage it with End(xlDown).

Thank you for your help!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
LR = Cells(Rows.Count, "A").End(XlUp).Row

That is the basic coding for the last row. Adjust the column as needed. LR + 1 would be the next available row, so if you want to leave a blank you would use LR + 2.
 
Upvote 0
Cross posted https://www.excelforum.com/excel-pr...ba-write-after-the-last-row-with-content.html

Cross-Posting
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top