please help

  • Thread starter Thread starter samsg
  • Start date Start date
S

samsg

Hi, i have a list of values like this:

54
24
31
...

I want to place number 54 and then leave 4 blank spaces, the plac
number 24, and 4 blanks, and so on, so it would look like this

54


24


31
...

How can i do this automatically?, the list is too long to insert
cells and then press f4 for each value, is there an autofill that ca
skip rows , or something that can help me??

Thanks a lot for the hel
 
not smart enough, but workable...

Sub Button1_Click()

Set rng = Range("A:A")
rng.Cells(1, 1).Select
i = 1

While Not IsEmpty(ActiveCell)

If i > 1 Then
rng.Cells(i, 1).EntireRow.Insert
rng.Cells(i + 1, 1).EntireRow.Insert
rng.Cells(i + 2, 1).EntireRow.Insert
rng.Cells(i + 3, 1).EntireRow.Insert
rng.Cells(i + 5, 1).Select
i = ActiveCell.Row
Else
i = i + 1
End If
Wend

End Sub


- Manges
 
Dim cRows As Long
Dim i As Long

cRows = Cells(Rows.Count, "A").End(xlUp).Row
For i = cRows To 2 Step -1
Cells(i, "A").Resize(4, 1).EntireRow.Insert
Next i

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top