Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
TB TB is offline
external usenet poster
 
Posts: 26
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
TB TB is offline
external usenet poster
 
Posts: 26
Default 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!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic code Pickle Excel Discussion (Misc queries) 1 September 4th 08 03:35 PM
I need a visual basic code....please Rhonda Excel Discussion (Misc queries) 1 March 5th 07 01:18 PM
Visual basic Code GRobertson Excel Programming 3 January 10th 05 02:16 PM
visual basic code Whitey Excel Programming 1 October 26th 04 04:05 PM
Visual Basic Code Robert Couchman Excel Programming 2 February 2nd 04 03:10 PM


All times are GMT +1. The time now is 06:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"