insert 3 rows before any text in column A

O

onesaint

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
 
D

Don Lloyd

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
 
Top