#1   Report Post  
Posted to microsoft.public.excel.misc
fak119
 
Posts: n/a
Default Finding Row

Is there an easy way (Macro) to go to the next empty row or column?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett
 
Posts: n/a
Default Finding Row

next
nr=cells(activecell.row,activecell.column).end(xld own).row+1
or better yet
lr=cells(rows.count,activecell.column).end(xlup).r ow+1

--
Don Guillett
SalesAid Software

"fak119" wrote in message
...
Is there an easy way (Macro) to go to the next empty row or column?



  #3   Report Post  
Posted to microsoft.public.excel.misc
fak119
 
Posts: n/a
Default Finding Row

Do I simply enter this last line into any Macro?

"Don Guillett" wrote:

next
nr=cells(activecell.row,activecell.column).end(xld own).row+1
or better yet
lr=cells(rows.count,activecell.column).end(xlup).r ow+1

--
Don Guillett
SalesAid Software

"fak119" wrote in message
...
Is there an easy way (Macro) to go to the next empty row or column?




  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Finding Row

Yep. Then you can use it any way you want.

Option Explicit
sub testme()
dim LR as long
with activesheet
lr = .cells(.rows.count,activecell.column).end(xlup).ro w + 1
.cells(lr,"A").value = "Hi there"
.cells(lr,activecell.column).value = "Bye there"
end with
end sub

Don used the activecell to find the next row. I think I would look at my data
and pick out a column that always has data--say column A:

So the line of code becomes:
lr = .cells(.rows.count,"a").end(xlup).row + 1






fak119 wrote:

Do I simply enter this last line into any Macro?

"Don Guillett" wrote:

next
nr=cells(activecell.row,activecell.column).end(xld own).row+1
or better yet
lr=cells(rows.count,activecell.column).end(xlup).r ow+1

--
Don Guillett
SalesAid Software

"fak119" wrote in message
...
Is there an easy way (Macro) to go to the next empty row or column?





--

Dave Peterson
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
Finding Asymptotes from a set of data in Excel WAYNEL Excel Worksheet Functions 1 January 7th 06 01:28 AM
Finding Asymptotes from a set of data in Excel WAYNEL Excel Discussion (Misc queries) 0 January 6th 06 10:48 PM
Finding text within text Teresa Robinson New Users to Excel 8 October 20th 05 10:20 PM
Finding an Excel value using one repeating & another value? Joe R. Excel Worksheet Functions 1 August 17th 05 01:47 PM
Finding Duplicate Names from Different Lists... PokerZan Excel Discussion (Misc queries) 1 July 8th 05 09:58 AM


All times are GMT +1. The time now is 03:22 PM.

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

About Us

"It's about Microsoft Excel"