Posted to microsoft.public.excel.programming
|
|
How do I transfer repeating info in a column to 3 rows?
I copied exactly, but came with an error due to:
(x + 4 *
y).Value
then put all on one line, but no result in right columns, still blank.
"Martin" wrote:
Here's a macro. Go to Tools, Macro, VB Editor. Then Insert, Module and
paste the following into it:
Sub ToColumns()
Dim x As Long
Dim y As Long
For y = 0 To Int(Selection.Rows.Count / 4 - 1)
For x = 0 To 3
ActiveCell.Offset(y, x + 2).Value = ActiveCell.Offset(x + 4 *
y).Value
Next x
Next y
End Sub
To run it, go back to Excel and select your info from the first name down to
the blank after the final email. Then click on Tools, Macro, Macros and
double-click ToColumns. Bewa this macro will overtype the columns to the
right of your list!
"Jay Goldblatt" wrote:
NOTE: I am not a programmer, and will thus need step by step instructions...
PROBLEM:
I have a column with three pieces of information that repeat in a pattern.
eg) Name, Phone Number, Email, (space), Name, Phone Number, Email, (space),
etc.
I know that I can transpose the multiple rows to columns, but that just
leaves me with a similar problem of repeating info in multiple columns!
Is there a formula to use to take all the similar info and list it in the
right columns?
Thanks.
|