Changing Marco

J

JBoyer

I have a marco that does what I want it to except it messes up some of the
other data on my worksheet. I have two marcos, one for inserting and one for
deleting. They are the following:
Sub InsertSemester()
Dim LastRow As Long
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
v = Rows(LastRow - 1).Formula
Cells(LastRow - 1, "A").Resize(5, 1).EntireRow.Insert
Rows(LastRow - 1) = v
Rows(LastRow + 4).ClearContents
Range("AU2:BG6").Copy Cells(LastRow, "A")
End Sub

Sub DelLastFive()
Dim lr As Long, x As Long
lr = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
x = lr - 4
ActiveSheet.Rows(x & ":" & lr).Delete
End Sub
 
J

JBoyer

Sorry this was posted by accident. It can be ignored I have a different post
with the complete question
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top