Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() try this. the key is working from the bottom up instead of the top down. Sub insertrowifnotminusonerow() lr = Cells(Rows.Count, "c").End(xlUp).Row For i = lr To 2 Step -1 If Cells(i - 1, "c") < Cells(i, "c") Then Rows(i).Insert Next i End Sub -- Don Guillett SalesAid Software "rtidrtid" wrote in message ... anyone a dab hand at Excel? I need a had creating a macro. What i have is a column with numbers, for example 12222 12222 21111 21111 13333 13333 what i need is a macro which will insert a blank row after an identical sequence of numbers, turning the above into 12222 12222 21111 21111 13333 13333 any ideas? -- rtidrtid ------------------------------------------------------------------------ rtidrtid's Profile: http://www.excelforum.com/member.php...o&userid=31148 View this thread: http://www.excelforum.com/showthread...hreadid=508130 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to insert blank lines | Excel Discussion (Misc queries) | |||
Insert Row macro not working | Excel Discussion (Misc queries) | |||
Activate a macro to insert a row and copy the formuals from the rows above to the blank row | Excel Discussion (Misc queries) | |||
How to insert a Macro within a macro? | Excel Discussion (Misc queries) | |||
Inserting Blank Rows Macro? | Excel Worksheet Functions |