Hi,
This is the code I use for this.
Suppose you are looking for the next available row in column A
A = 1
Do Until Cells(A, 1) =
A = A + 1
Loop
When this section finishes, the next available cell: Cells(A, 1)
If your data is contiguous, you can use:
A = WorksheetFunction.CountA(A:A) + 1
How do you define next available row ??
Is your spreadsheet filled with no blank rows
and you're looking for the last row?
or does your sheet have blank rows in the middle of data?
If the first is true (no blank rows)
There is a couple ways to do it.
the way I like is to use a Worksheet
I asked this question to soon. Right after I posted the question, I
found the answer.
On Mar 4, 8:38 am, iwasinnihon iwasinni...@gmail.com wrote:
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
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