I am brand new to code and have spent hours searching and reading to try and find what I am looking for. I have found this post (Excel VBA - Insert row above specific text and copy formats and formula) that should answer my question but because of my lack of knowledge I am unable to make it completely work for me. I can make the second code work to insert a row based on text but I am unable to determine how to copy the formulas from cells J, O, Z, and AE into the new row.
Can this be done with one code?
Here is the macro:
Sub InsterRowCopyFormatForumula()
'
InsertRowCopyFormatFormula Macro
'
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A6:B6").Select
Range("J5").Select
Selection.AutoFill Destination:=Range("J5:J6"), Type:=xlFillDefault
Range("J5:J6").Select
Range("O5").Select
Selection.AutoFill Destination:=Range("O5:O6"), Type:=xlFillDefault
Range("O5:O6").Select
Range("Z5").Select
Selection.AutoFill Destination:=Range("Z5:Z6"), Type:=xlFillDefault
Range("Z5:Z6").Select
Range("AE5").Select
Selection.AutoFill Destination:=Range("AE5:AE6"), Type:=xlFillDefault
Range("AE5:AE6").Select
End Sub