• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Auto insert text in a new created cell when inserting a new row

jules meredith

New Member
I have a spreadsheet that uses some vba to create a new name range whenever the contents of cells in column C are changed - (the new name range is named after the contents of the changed cell in column C . This works well until I try to insert a new row - the vba crashes because the cell it is looking at has no text and named ranges must begin with a letter or underscore. There is a lot of info on tables and automatically copying "formulas" when inserting new rows but not for a simple text string i.e "SET_UP"
 

Stevie

Active Member
A clever way to detect the insertion of cells (with a test for if this insert is a whole row) is included in post #4 at this link.
It covers inserting from the command bar, and from the right click menu.
You could disable calculation and enter your "SET_UP" string in the appropriate location following this event.
This should prevent an error being triggered.

If this was helpful, please click 'Like' in the bottom right.

Stevie
 
Top