Try using

iLastRow = Range("F1").End(xlDown).Row

rather than

iLastRow = ActiveSheet.Cells(Rows.Count, "F").End(x1Up).Row

Best rgds
Chris Lav


"Don Guillett" <donaldb@281.com> wrote in message
news:uUZRfIsyFHA.2652@TK2MSFTNGP14.phx.gbl...
> a cursory look suggests you need to change 1 to l
>
> --
> Don Guillett
> SalesAid Software
> donaldb@281.com
> "Acct Supr - DCTC" <AcctSuprDCTC@discussions.microsoft.com> wrote in

message
> news:DBCFD776-87BF-4CC0-A0C0-D0FA4170D6C9@microsoft.com...
> > I have the following macro set up but it keeps hanging up on the first
> > indented line.
> >
> > Sub Insertrow()
> > '
> > ' Insertrow Macro
> > ' Macro recorded 10/6/2005 by DCTC
> > '
> > ' Keyboard Shortcut: Ctrl+i
> > '
> > Dim iLastRow As Long
> > Dim i As Long
> > iLastRow = ActiveSheet.Cells(Rows.Count, "F").End(x1Up).Row
> > For i = iLastRow To 1 Step -1
> > If Cells(i, "F").Value = "Total" Then
> > Rows(i + 1).EntireRow.Insert
> > End If
> > Next i
> > End Sub

>
>