View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default how do paste same data in every other line

Hi,

If I've understood correctly, right click the sheet tab, view code and paste
this in and run it.

Sub stance()
lastrow = Range("A65536").End(xlUp).Row
For x = lastrow To 2 Step -1
Rows(x & ":" & x).Select
For y = 1 To 3
Selection.Insert Shift:=xlDown
Next
Cells(x, 1).Select
ActiveCell.Offset(1, 0).Value = "S"
ActiveCell.Offset(2, 0).Value = "E"
Next
End Sub

Mike

"ben0209" wrote:

Afternoon all
I am looking at a data table comprising 1 column x multiple rows. I would
like to be able to insert between every entry (all different) the sequence of:
DATA
blank row,
cell containing 'S'
cell containing 'E'
NEXT DATA.

I have seen some threads and can insert three blank rows but am falling down
at getting the specific texts in the cells.
Any help would be appreciated.