Make stair columns

C

chunrima

Hi..there
If you have any clue, please help me out.
I have the values in A column below
A
B
C
D
E
F
G
H
I
J
K
L
But I wold like to get:
A
B D
C E G
F H J
I K
L

Thank you.
 
D

Dave Peterson

How about a macro:

Option Explicit
Sub testme()

Dim DestCell As Range
Dim myStep As Long
Dim LastRow As Long
Dim FirstRow As Long
Dim iRow As Long

myStep = 3

With Worksheets("sheet1")
FirstRow = 1
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

Set DestCell = .Range("a1")
For iRow = FirstRow + myStep To LastRow Step myStep
Set DestCell = DestCell.Offset(1, 1)
With .Cells(iRow, "A").Resize(myStep)
.Copy _
Destination:=DestCell
.ClearContents
End With
Next iRow

End With

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
B

Bryan Hessey

My working columns are in the attached .xls, but it would take someone
with a little more expertise to make a simple one-column formula from
that.

Good luck, and if you cannot access the .zip file from
www.excelforum.com please let me know and I will email it to you.

Cheers


ps, hi Dave

Hi..there
If you have any clue, please help me out.
I have the values in A column below
A
B
C
D
E
F
G
H
I
J
K
L
But I wold like to get:
A
B D
C E G
F H J
I K
L

Thank you.


+-------------------------------------------------------------------+
|Filename: pyramid.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4052 |
+-------------------------------------------------------------------+
 
C

chunrima

Hi Bryan:
I coudn't get pyramid.zip file you attached.
The webserver said the line is invalid.
If you send me the file, it would be great.
Thanks.
Jae Ryu
 

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