Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default insert 3 rows before any text in column A

Help!

thank you in advance for any help to this situation.

i need a application level macro (if possible, meaning to be able t
run on anyworkbook) to insert 3 rows above and text that is found i
column "A". so if "what" is in column A i need 3 rows above it or i
the text is "Juan Baldez" then 3 rows and so on. once again thanks fo
the fix in advance.

Kimme

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default insert 3 rows before any text in column A

Hi Kimmer,

The following will insert rows as required on the activesheet, Column A.
The rows will be inserted from row 4 down to the last item found
Actually, it does it the other way around!

Sub Test()
Dim CurRow, C
CurRow = Cells(Rows.Count, "A").End(xlUp).Row
Do
If Cells(CurRow, 1) "" Then
For C = 1 To 3
Rows(CurRow).Insert
Next
End If
CurRow = CurRow - 1
Loop Until CurRow = 4
End Sub

regards,
Don

"onesaint " wrote in message
...
Help!

thank you in advance for any help to this situation.

i need a application level macro (if possible, meaning to be able to
run on anyworkbook) to insert 3 rows above and text that is found in
column "A". so if "what" is in column A i need 3 rows above it or if
the text is "Juan Baldez" then 3 rows and so on. once again thanks for
the fix in advance.

Kimmer


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default insert 3 rows before any text in column A

QUite Nice Don! it works like a charm. thanks again for the help.

Kimme

--
Message posted from http://www.ExcelForum.com

Reply
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
Insert cell text every 5 rows in a column Mike Mike Excel Discussion (Misc queries) 9 September 16th 10 09:53 AM
Insert Column after specific text title the new column and add for David Excel Discussion (Misc queries) 5 October 2nd 09 04:03 PM
Text to Rows and then Insert Blank Rows [email protected] Excel Discussion (Misc queries) 1 December 20th 08 04:23 PM
how insert same text in empty cells in column (10000 rows) bromptongadgets Excel Worksheet Functions 1 December 11th 05 03:13 PM
Insert Rows after text appears in column KENNY Excel Programming 4 August 17th 04 12:45 AM


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

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

About Us

"It's about Microsoft Excel"