LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Don Don is offline
external usenet poster
 
Posts: 487
Default insert a line via macro

thanks for the help in the past.

I have a spreadsheet that I want to find a statement like "section 1" that
could change the line it is on then backup two line and insert a line or
maybe 5 lines.

I have tried to record a macro but it keeps selecting the line and I thought
there was an offset command in VB?

Columns("A:A").Select
Selection.Find(What:="Section 1", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
Range("A8").Select
Selection.EntireRow.Insert
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to insert blank line when lines sum to zero TCoats Excel Discussion (Misc queries) 0 July 2nd 07 05:08 PM
Insert blank line macro laidebug Excel Worksheet Functions 1 April 14th 06 11:56 PM
Macro Line Insert Frantic Excel-er Excel Discussion (Misc queries) 4 March 20th 06 11:08 PM
Insert each line in a new row BrianB Excel Discussion (Misc queries) 0 May 31st 05 03:14 PM
Insert Line Macro Spyder Excel Discussion (Misc queries) 1 March 3rd 05 12:17 AM


All times are GMT +1. The time now is 05:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"