PDA

View Full Version : [SOLVED] Insert new row above specific text



ajhez
04-04-2017, 03:55 AM
Hi all

Hopefully a super simple one :(

I want to insert a new row above a row that contains some specific text.

The purpose of this is to create a button on the sheet which will automatically do this for those individuals who do not know how to insert their own new rows without destroying the content of the sheet.

The specific text will be something random like "zgx500" which shouldn't be repeated elsewhere in the doc but i will have hidden it on the Row that i never want the users to go below.

Many thanks for any help!

Cheers,
Alex

mdmackillop
04-04-2017, 06:25 AM
Cells.Find("zgx500").EntireRow.Insert

ajhez
04-06-2017, 04:12 AM
Many thanks for your help!

How would you change that to insert a row two rows above the specific text? Would this be with an offset of some kind?

Thanks again!

mdmackillop
04-06-2017, 04:29 AM
Cells.Find("zgx500").Offset(-1).EntireRow.Insert