ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Visual Basic code to find next available (blank) row in a spreadsh (https://www.excelbanter.com/excel-programming/334427-visual-basic-code-find-next-available-blank-row-spreadsh.html)

TB

Visual Basic code to find next available (blank) row in a spreadsh
 
This may be basic VB code but I need to write a code that will find the next
available blank row in a spreadsheet. Once I find it, I need additional code
to reference this particular row but not by row #. I will be locating the
next available blank row, adding data to this row and then graphing it. I
will need to know how to reference the newly identified row each month so the
code cannot be fixed (e.g., if I identify row 20 this month, it will not be
available next month because I will be appending the same file each month).
Any help would be greatly appreciated!

Tom Ogilvy

Visual Basic code to find next available (blank) row in a spreadsh
 
If column A can be used to make the determination

Dim rng as Range
set rng = Cells(rows.count,1).End(xlup).Offset(1,0)

--
Regards,
Tom Ogilvy

"TB" wrote in message
...
This may be basic VB code but I need to write a code that will find the

next
available blank row in a spreadsheet. Once I find it, I need additional

code
to reference this particular row but not by row #. I will be locating the
next available blank row, adding data to this row and then graphing it. I
will need to know how to reference the newly identified row each month so

the
code cannot be fixed (e.g., if I identify row 20 this month, it will not

be
available next month because I will be appending the same file each

month).
Any help would be greatly appreciated!




TB

Visual Basic code to find next available (blank) row in a spre
 
Thanks, Tom. That got me started in the right direction and I was able to
complete the code.

"Tom Ogilvy" wrote:

If column A can be used to make the determination

Dim rng as Range
set rng = Cells(rows.count,1).End(xlup).Offset(1,0)

--
Regards,
Tom Ogilvy

"TB" wrote in message
...
This may be basic VB code but I need to write a code that will find the

next
available blank row in a spreadsheet. Once I find it, I need additional

code
to reference this particular row but not by row #. I will be locating the
next available blank row, adding data to this row and then graphing it. I
will need to know how to reference the newly identified row each month so

the
code cannot be fixed (e.g., if I identify row 20 this month, it will not

be
available next month because I will be appending the same file each

month).
Any help would be greatly appreciated!






All times are GMT +1. The time now is 01:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com