Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a large table with infrequent blank cells in a single column. I want
to located these and insert a new row directly after that blank cell's row. This isn't working .... Sub InsertBlankLine() ' FinalRow = Cells(Rows.Count, 8).End(xlUp).Row ' For Counter = 1 To FinalRow Set curCell = Worksheets("Sheet1").Cells(Counter, 6) If curCell.Value < 1 Then curCell.Value = FinalRow ' ActiveCell.Offset(1).EntireRow.Insert Shift:=xlDown ' Next Counter End Sub Row 8 contains the first blank cell condition but the macro inserts 13 blank rows right after the first row. (13 is the value of FinalRow). I have spent 4 hours on this trying every combination I can think of. Your help is appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Up until Non-Blank Cell encountered | Excel Discussion (Misc queries) | |||
if cell is blank insert a zero | Excel Discussion (Misc queries) | |||
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... | Excel Programming | |||
when encountered Zero/Blank CF issues ... | Excel Programming | |||
Copy value and fill blank spaces below it until new value is encountered? | Excel Programming |