VBA to go to bottom row (with data) in a sheet

aaronglover

Board Regular
Joined
Sep 15, 2005
Messages
130
Hi all,
I am trying to create an excel macro that will go to the bottom row of data in a given sheet, then go down 1 more row, then paste some new data. What I want to do is create a continuous table of data that just that I can append new data at the end automatically with the use of a macro.

Any thoughts?
Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Code:
Dim NextRow As Long
NextRow = Cells(Rows.Count, 1).End(xlUp).Row + 1

will give you the number of the first empty row in column A.
 
Upvote 0
Where's the new data coming from?

You can determine the next blank row in various ways.

For example:
Code:
NextRow = Range("A" & Rows.Count).End(xlUp).Row+1
 
Upvote 0
do you need it for a specific column (like Column A) or any column that has data in it?

Michael
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,196
Members
449,072
Latest member
DW Draft

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