Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
and i want to create a macro in excel that add a row when i reach a certain cell. any help appreciated
You can add the below to the SelectionChange event of the worksheet and change the condition as necessary.
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If ActiveCell.Row = 2 Then Selection.EntireRow.Insert End If End Sub
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.