![]() |
Finding Row
Is there an easy way (Macro) to go to the next empty row or column?
|
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? |
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? |
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 |
All times are GMT +1. The time now is 08:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com