Take a 3 column list, make it 1 column

Davers

Well-known Member
Joined
Sep 17, 2002
Messages
1,165
Hey everyone. I have a list with name in column A, extension in column B, and level in column . I'd like to combine those to columns into 1. So this:

Code:
Name	Extension	Level
Anderson 34888	1
Crawford	34252	1
Fairful     34444	1
Heath	34275	1
Jaffe	68998	1
Kohl	34272	1
Kujawski	16868	1
Lyon	34222	1
Morrison	34257	1
Shamus	34255	1
Skelton	34999	1

Would look like this:

Code:
List
Anderson
34888
1
Crawford
34252
1
Fairful
34444
1
Heath
34275
1
Jaffe
68998
1
Kohl
34272
1
Kujawski
16868
1
Lyon
34222
1
Morrison
34257
1
Shamus
34255
1
Skelton
34999
1

VBA would be the preferred method. Any ideas?

Thanks!!

Dave
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try:
Code:
Sub MachineGunsRock ()
Dim i as Long, j as Long
Application.ScreenUpdating = False
j = 1
For i = 1 to Range("A" & Rows.Count).End(xlUp).Row
  Range("D" & j) = Range("A" & i)
  Range("D" & j + 1) = Range("B" & i)
  Range("D" & j + 2) = Range("C" & i)
  j = j + 3
Next i
Range("A:C").Delete shift:=xlToLeft
Rows("2:3").Delete
Range("A1") = "List"
Application.ScreenUpdating = True
End Sub
 
Last edited:
Upvote 0
Try:-
Code:
[COLOR="Navy"]Sub[/COLOR] MG18May33
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Dim[/COLOR] c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
[COLOR="Navy"]Set[/COLOR] Rng = Range(Range("A2"), Range("c" & rows.Count).End(xlUp))
    [COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
        c = c + 1
        Range("D" & c) = Dn
    [COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
Well, you apparently do not need it any more, but since I developed it, and since it is a different approach than the other posted solutions, I figured I would post it for archival purposes...
Code:
Sub ThreeColumnsToOne()
  Dim X As Long, LastRow As Long
  LastRow = Cells(Rows.Count, "A").End(xlUp).Row
  Application.ScreenUpdating = False
  For X = LastRow To 2 Step -1
    Cells(X, "A").Resize(3) = WorksheetFunction.Transpose(Cells(X, "A").Resize(1, 3))
    Rows(X).Resize(2).Insert
  Next
  Columns("B:C").Clear
  Rows("2:3").Delete
  Range("A1").Value = "List"
  Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top