RSantos Wrote:
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?
Sub ValSunday()
'
Range("A9").Select
If Selection.Value = "Sunday" Then
'your code here
End If
End Sub
copy and paste this in a normal module,
create a button and assin this macro to it:
once you work on the code and add other code that meets your specs,
you can then paste it into your worksheet change event but thats
another story
work on the macro first
--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile:
http://www.excelforum.com/member.php...o&userid=31708
View this thread:
http://www.excelforum.com/showthread...hreadid=516687