Thread: VBA
View Single Post
  #3   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Betty,

Sub BettysMacro()
Dim Rng As Range
Dim Dest As Range
Dim myArea As Range
Dim i As Integer

Set Rng = ActiveSheet.Range("A:A"). _
SpecialCells(xlCellTypeConstants, 23)

For Each myArea In Rng.Areas
Set Dest = ActiveSheet.Range("B65536").End(xlUp)(2)
For i = 1 To myArea.Cells.Count
Dest(1, i).Value = myArea(i, 1).Value
Next i
Next myArea

ActiveSheet.Range("A:A").EntireColumn.Delete

End Sub

HTH,
Bernie
MS Excel MVP


"Betty Csehi" wrote in message
...
I believe I need a VBA to do what I want. Since I'm not good at VBA, I'm
hoping someone out there can help me out. Here's what I have in Column A:

1)Rent Type
2)Date
3)Category
4)
5)Recourse
6)12/31/04
7)Net
8)
9)Non-Recourse
10) 6/30/05
11) Full

I imported this info and what happened is that the program stacked 3 areas
of info into one column. What I want to do is break that out into 3
separate columns. So Col A will be Rent, Col B will be Type and Col C

will
be Category. The next 3 rows is the associated info.

I can breakout the column headings, but can a formula be written that will
put what is in row 5 under column A, row 6 under col B and row 7 under col
C. It would then skip Row 8, put what is in row 9 under col A, what is in
row 10 under col B and what is in row 11 under col C.

I have approximately 500 rows of data.

Thanks!