View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Inserting a blank row when data changes

try something like this working from the bottom up

sub insertatchange
for i=cells(rows.count,"a").end(xlup).row to 1 step -1
if cells(i-1,"a")<cells(i,"a") then rows(i).insert
next i
end sub
--
Don Guillett
SalesAid Software

"achidsey" (notmorespam) wrote in message
...
Excel Experts:

I have a spreadsheet similar to the following

A B
1 4K3F
2 4K3F
3 4K3F
4 5B6L
5 5B6L
6 8E2B
7 8E2B

I would like my macro to go down column A, and each time the data changes
(i.e., row 4 and row 6) insert a blank row.

What code would do this?

Thanks
Alan

--
achidsey