Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe you can help me with this problem. How can i transform the code that
follows to delete a row if the value in Column C is less than 0.01? Dim LastRow As Long, r As Long LastRow = ActiveSheet.UsedRange.Rows.Count LastRow = LastRow + ActiveSheet.UsedRange.Row - 1 Application.ScreenUpdating = False For r = LastRow To 1 Step -1 If WorksheetFunction.CountA(Rows(r)) = 0 Then Rows(r).Delete Next r "Gord Dibben" wrote: Or If some one could help me figure out another way to undo the remove blank row instruction at the beginning of the code. Which code would that be.................you did not post any code. Try this macro. Sub InsertRow_At_Change() 'Sandy Mann July 1st, 2007 Dim LastRow As Long Dim X As Long LastRow = Cells(Rows.Count, 1).End(xlUp).Row Application.ScreenUpdating = False For X = LastRow To 3 Step -1 If Cells(X, 1).Value < Cells(X - 1, 1).Value Then If Cells(X, 1).Value < "" Then If Cells(X - 1, 1).Value < "" Then Cells(X, 1).entirerow.Insert Shift:=xlDown End If End If End If Next X Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On Thu, 17 Jul 2008 12:10:06 -0700, KWhamill wrote: This sounds silly, I have a spreadsheet sorted by column I which is text, all i need to do is insert a blank row inbetween the changes. Or If some one could help me figure out another way to undo the remove blank row instruction at the beginning of the code. respectfully, Karl |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I insert a true blank inst. of a non-blank zero string | Excel Worksheet Functions | |||
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... | Excel Programming | |||
Macro to insert copy and insert formulas only to next blank row | Excel Programming | |||
Macro code to test for blank row and insert blank row if false | Excel Programming | |||
Insert blank row | Excel Programming |