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

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
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

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,358
Office Version
  1. 365
Platform
  1. Windows
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

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
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,191,171
Messages
5,985,067
Members
439,938
Latest member
MAlhash

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
Top