Thread: for/next loop
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default for/next loop


sub getlastrow()
lr = Cells.Find(What:="*", After:=[A1],
SearchDirection:=xlPrevious).Row

cells(lr,"b").copy somewhere
end sub
If desired, send your file to my address below along with this msg and
a clear explanation of what you want and before/after examples.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Poor Richard" wrote in message
...
I have a sheet in a workbook where I need to select the last row containing
data. Is there a for/next loop function where I can identify the last row,
then select data from it, or can I update two sheets simultaneously with
one input?
I am using Office 97, windows xp.

--