Thread: Macro looping?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Macro looping?

sub loopit()
lastrow=cells(rows.count,"a").end(xlup).row
for i= 1 to lastrow
cells(i,1)=??
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"klh84" wrote in message
...
How do I code a macro so that it loops until it goes through all of the
information on the excel file? This way I do not have to rewrite the same
code for 20 lines one day and then 30 lines the next day.