insert cells in alternating rows?

H

happygal

I wish to add cells to alternating rows to move the info over to the next
column.
Is it possible to do that without highlighting each row?
 
R

Reitanos

You would need a macro like the following:

Sub MoveAlternating()
'starting in a selected cell this macro checks for content and then
'moves data in a cell one column to the right in alternating rows
'skip first row of data
ActiveCell.Offset(1, 0).Range("A1").Select
While ActiveCell <> ""
Selection.Insert Shift:=xlToRight
ActiveCell.Offset(2, 0).Range("A1").Select
Wend
End Sub

It skips the first row and then moves every other row's data over one
column to the right. It will stop when it encounters the first blank
cell.

Let me know if that's not what you were looking for.
 

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

Top