Jo Helge Rorvik
New Member
- Joined
- Mar 23, 2023
- Messages
- 11
- Office Version
- 365
I have a Range(D4:D4) which I want to expand with adding a new row at the first position in range -> Row(4)
At he bottom in Row(5) I have a summation Relative: '=SUM(R4C:R[-1]C)'
The row I have do not have any data its just a formatting row with Date and Text and Currency among others
I wanted to add a new row and use the current row(4) as a template for the content added.
I just used the macro recorder and got this code:
Rows("4:4").Select
Selection.Copy
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
The template worked fine, and formatting is copied, but
when I look in my summary cell, the formula has changed Relative: '=SUM(R5C:R[-1]C)'
gone to row 5, I still want it to start at 4
Is there a solution to include the inserted row??
Thanks for any solution
At he bottom in Row(5) I have a summation Relative: '=SUM(R4C:R[-1]C)'
The row I have do not have any data its just a formatting row with Date and Text and Currency among others
I wanted to add a new row and use the current row(4) as a template for the content added.
I just used the macro recorder and got this code:
Rows("4:4").Select
Selection.Copy
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
The template worked fine, and formatting is copied, but
when I look in my summary cell, the formula has changed Relative: '=SUM(R5C:R[-1]C)'
gone to row 5, I still want it to start at 4
Is there a solution to include the inserted row??
Thanks for any solution