keilah
09-26-2007, 11:52 PM
Hi this code was amend and updated and provided by XLD.......works a treat just need to know how to amend it so that it proforms the same function - BUT this time changes the date field in column 8 (H) as opposed to B......
Some guidance for the Beginner..... Here is the code...
Sub MyMacro()
Dim cell As String
cell = InputBox("Enter the very last row + 1 i.e (B37 + 1 = B38)")
With Range(cell)
.EntireRow.Insert Shift:=xlDown
.RowHeight = 12.75
.RowHeight = 5
.Offset(-2, 0).EntireRow.Copy
.Offset(-1, 0).EntireRow.PasteSpecial Paste:=xlPasteFormulas, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
.Offset(-1, 0).Value = DateSerial( _
Year(.Offset(-2, 0).Value), Month(.Offset(-2, 0).Value) + 1, Day(.Offset(-2, 0).Value))
End With
End Sub
thanks
Some guidance for the Beginner..... Here is the code...
Sub MyMacro()
Dim cell As String
cell = InputBox("Enter the very last row + 1 i.e (B37 + 1 = B38)")
With Range(cell)
.EntireRow.Insert Shift:=xlDown
.RowHeight = 12.75
.RowHeight = 5
.Offset(-2, 0).EntireRow.Copy
.Offset(-1, 0).EntireRow.PasteSpecial Paste:=xlPasteFormulas, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
.Offset(-1, 0).Value = DateSerial( _
Year(.Offset(-2, 0).Value), Month(.Offset(-2, 0).Value) + 1, Day(.Offset(-2, 0).Value))
End With
End Sub
thanks