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 insert row at each change of surname in excel


something like this
sub insertrows()
for i=cells(rows.count,"a").end(xlup).row to 2 step -1
if cells(i-1,"a")<cells(i,"a") then rows(i).insert
next i
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"De" wrote in message
...
I have a list of 650 entries using 40 surnames - sometimes only appearing
once, others 7 times. At every change in surname, I would need to insert
a
row. Thanks
--
De