Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think that this one will work.
Option Explicit Sub testme() Dim FirstRow As Long Dim LastRow As Long Dim iRow As Long Dim wks As Worksheet Set wks = ActiveSheet With wks FirstRow = 1 LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For iRow = LastRow To FirstRow Step -1 If IsDate(.Cells(iRow, "A").Value) Then .Rows(iRow).Insert End If Next iRow End With End Sub The last one worked ok--unless there were two dates in consecutive cells. (Bad testing on my part--sorry.) Annette wrote: Does anyone have a macro already written that inserts a blank row above any date found in a column. I am attempting to insert a blank row above every date found in column A -- the number of rows will always be different. Thanks. -- Dave Peterson |
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 | |||
Insert a BLANK value | Excel Worksheet Functions | |||
insert blank cells | Excel Worksheet Functions | |||
insert a blank in every second line of a row | Excel Discussion (Misc queries) | |||
Insert blank row and issue a sum | Excel Worksheet Functions |