Hello!
I'll need a macro that copies always row 7 (B7:G7) and adds a line up with the same formatting and formulas but no data in the cells. Example: testing.xlsx
Cheers
Hello!
I'll need a macro that copies always row 7 (B7:G7) and adds a line up with the same formatting and formulas but no data in the cells. Example: testing.xlsx
Cheers
I'll assume that you already have a macro that copies the range.
Add to it the following steps:
Select range B:7-F7
Clear contents
Since those cells have literal values, they'll be cleared and their formatting kept, but the G7 cell, which has a formula, will remain intact.
Well I used this code:
I was trying some code better, but this one works fineSub add()
Rows("7:7").Insert Shift:=xlUp
Range("B8:G8").Copy
Range("B7").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("B7:F7").ClearContents
End Sub