Dim oRow As Range
For Each oRow In Selection.Rows
If Weekday(oRow.Cells(1, 1).Value) = 1 Then
oRow.Offset(1, 0).Insert
End If
Next oRow
--
HTH
Bob Phillips
(remove nothere from the email address if mailing direct)
"RSantos" wrote in
message ...
HI,
I would like to insert a row when a certain cell has a certain value.
The ideia is to divide the values into weeks, inserting an empty row
after every sunday (where I wiil put the totals of the week), and group
the whole week in order to see just the week total.
Can anyone help me doing this in VBA?
--
RSantos
------------------------------------------------------------------------
RSantos's Profile:
http://www.excelforum.com/member.php...o&userid=31240
View this thread: http://www.excelforum.com/showthread...hreadid=516687