Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I need help creating a macro that will insert a row everytime a value in
column C does not equal the one before it. My data set can be 1000+ rows, so doing this manually is a bit mind-numbing. I could also set up may data so that a 0 or 1 is indicated every row that needs to have a row inserted. thanks in advance. |
#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 "aashish" wrote in message ... I need help creating a macro that will insert a row everytime a value in column C does not equal the one before it. My data set can be 1000+ rows, so doing this manually is a bit mind-numbing. I could also set up may data so that a 0 or 1 is indicated every row that needs to have a row inserted. thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Return SEARCHED Column Number of Numeric Label and Value | Excel Worksheet Functions | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
Entering Same Formula to A Full Staring from Say Row 5 Column..... | Excel Worksheet Functions | |||
How to group similar column titles together???? | Excel Discussion (Misc queries) | |||
Return Count for LAST NonBlank Cell in each Row | Excel Worksheet Functions |