If the next available row is the first blank row on the spreadsheet you can
use this:

iNextRow = Worksheet("MySheetName").Range("A65535").End(xlUp).Row + 1

Worksheet("MySheetName").Range("A65535").End(xlUp).Row returns the row
number for the last row in column A with data in it (you can change the
range to use a different column) and then adding 1 will give you the next
available row. You can use this then like so:

Worksheet("MySheetName").Range("A" & iNextRow).Value = Date

This will put today's date in the next available row.

-----Original Message-----
From: excel-macros@googlegroups.com [mailto:excel-mac...@googlegroups.com]
On Behalf Of iwasinnihon
Sent: Wednesday, March 04, 2009 8:39 AM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ Find next available row


I am writing a macro and would like to have it find the next available
row on a sheet, enter the date, do a vlookup, and enter a running
sum.  I can do everything except find the next available row.  How
would I do this?



--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to