P
pringle.sergio
Hi,
I created a macro that copies a set of data into a template.
Since the data vary in size, I had to make full column ranges so I
would always cover the cells with data. I also recorded a macro that
creates a formula based on two of those columns then copy/pastes the
formula down to the end of the spreadsheet (eg cell D65536).
After I run the macro to copy the data into the template and perform
the necessary calculations, how can I delete the remaining rows so all
I have are blank cells under the last row of data on my template.
Range("EXP_LF").Select
Selection.Copy
Sheets("Sheet8").Select
Range("N2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O2").Select
ActiveCell.FormulaR1C1 = "=RC[-3]-RC[-7]"
Range("O2").Select
Selection.Copy
Range("O3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone,
_
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Thank you
I created a macro that copies a set of data into a template.
Since the data vary in size, I had to make full column ranges so I
would always cover the cells with data. I also recorded a macro that
creates a formula based on two of those columns then copy/pastes the
formula down to the end of the spreadsheet (eg cell D65536).
After I run the macro to copy the data into the template and perform
the necessary calculations, how can I delete the remaining rows so all
I have are blank cells under the last row of data on my template.
Range("EXP_LF").Select
Selection.Copy
Sheets("Sheet8").Select
Range("N2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("O2").Select
ActiveCell.FormulaR1C1 = "=RC[-3]-RC[-7]"
Range("O2").Select
Selection.Copy
Range("O3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone,
_
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Thank you