Hello
I am Sreeraj and I am in need of help.
I am developing an excel sheet for my colleagues.
This sheet will be a dynamic sheet and my colleagues will need to keep on adding data to this file. This data may not use more than 700 rows.
I need a macro that
will identify the first blank cell in Column A
As for the number of rows to be inserted and
Copy the formulas and formating of the Row above the first blank cell and paste it in the number of rows defined.
I have a macro (thanks to google) that will identify the first blank cell in Column A and then copy the Row above the first blank cell and paste it once (both the formating and formulae).
It is given below
Sub Insert_Rows()
Range("A1:A1000").Select
Do Until ActiveCell.Value = "" = True
ActiveCell.Select
If ActiveCell.Value = "" = False Then
Selection.Offset(1, 0).Select
Else
End If
Loop
Application.ScreenUpdating = False
Dim cell As Range
Selection.EntireRow.Insert
For Each cell In Intersect(ActiveSheet.UsedRange, Selection.Offset(-1, 0).EntireRow)
If cell.HasFormula Then
cell.Copy cell.Offset(1, 0)
End If
Next
Application.ScreenUpdating = True
End Sub
I hope some one can help me with this.
Regards
Sreeraj
Bookmarks