I have a worksheet that has my companies action items and client action items. I have macros that add new copied rows with conditional formatting and formulas. The macros I have work but they add a new row under a specified row (18 and 29) which obviously causes issues if I add 4 or 5 rows to the top section.
In short, what I need to do is, instead of adding a row below Row 29, I need it to add a row in 2 rows below wherever the button is located. Is that possible?
Here is what I have, and yes, it's very simple. I am new to macros and VBA and all of this. Thank you for your time.
Sub AddNewRowAgendaTop()
'
' AddNewRowAgendaTop Macro
'
'
Rows("18:18").Select
Selection.Copy
Selection.Insert Shift:=xlDown
End Sub
Sub AddNewRowAgendaBottom()
'
' AddNewRowAgendaBottom Macro
'
'
Rows("29:29").Select
Application.CutCopyMode = False
Selection.Copy
Selection.Insert Shift:=xlDown
End Sub
In short, what I need to do is, instead of adding a row below Row 29, I need it to add a row in 2 rows below wherever the button is located. Is that possible?
Here is what I have, and yes, it's very simple. I am new to macros and VBA and all of this. Thank you for your time.
Sub AddNewRowAgendaTop()
'
' AddNewRowAgendaTop Macro
'
'
Rows("18:18").Select
Selection.Copy
Selection.Insert Shift:=xlDown
End Sub
Sub AddNewRowAgendaBottom()
'
' AddNewRowAgendaBottom Macro
'
'
Rows("29:29").Select
Application.CutCopyMode = False
Selection.Copy
Selection.Insert Shift:=xlDown
End Sub
Last edited: