get first blank row and paste formula and format from range
Hi all,
I need a macro which
1) find the first blank row and then
2) copies and paste the formula and format only from range A1:H10
This macro will only occur within the same sheet. As such, I've actually constructed a macro using my limited knowledge. Hope you guys could kindly help me modify from here.
[vba]
Sub copy_it()
Dim lrow As Long
Dim lrow2 As Long
lrow = Sheets(1).Range("A1:H10").End(xlUp).Row
lrow2 = Sheets(1).Range("A" & Rows.Count).End(xlUp).Row
lrow2 = lrow2 + 1
Sheets(1).Range("A" & lrow & ":H" & lrow).copy Sheets(1).Range("A" & lrow2)
Selection.PasteSpecial Paste:=xlPasteFormulasAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
End Sub
[/vba]
sorry as I'm really bad at this. So I usually depend on recording macros to get my ideas through.
Thanks in advance for the reply.