Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
A Macro to Insert Rows
I have repeating data in contiguous cells in a column. I want to insert a
row into the spreadsheet, each time a value in a cell below is not the same as the value in the cell immediately above. This will create groupings of identical values and a line between the groups. What I have now: AAAA AAAA AAAA BBBB BBBB CCCC DDDD What a want: AAAA AAAA AAAA BBBB BBBB CCCC DDDD |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
A Macro to Insert Rows
http://cjoint.com/?cesAZcANHi
Sub insertRows() i = 2 Do While i < [A65000].End(xlUp).Row Do While Cells(i, 1) = Cells(i + 1, 1) i = i + 1 Loop Rows(i + 1).Insert i = i + 2 Loop End Sub JB http://boisgontierjacques.free.fr On 2 fév, 17:25, Confused_in_Houston wrote: I have repeating data in contiguous cells in a column. *I want to insert a row into the spreadsheet, each time a value in a cell below is not the same as the value in the cell immediately above. *This will create groupings of identical values and a line between the groups. What I have now: AAAA AAAA AAAA BBBB BBBB CCCC DDDD What a want: AAAA AAAA AAAA BBBB BBBB CCCC DDDD |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert rows with condition using macro | Excel Discussion (Misc queries) | |||
Insert rows macro. | Excel Discussion (Misc queries) | |||
Insert Rows Macro | Excel Discussion (Misc queries) | |||
Excel Macro to insert rows | Excel Discussion (Misc queries) | |||
asking again, macro to insert rows | Excel Worksheet Functions |