Transpose the row data of a single cell into different cells in column

Lekha mohanty

New Member
Joined
Oct 26, 2021
Messages
12
Office Version
  1. 2010
Platform
  1. Windows
  2. Web
I have existing data is like this in column A & B with commas

Book2
AB
1168,69,70,71,72
2279,80,81,82,83,
3390,91,92,93,94
44102,103,104,105,106,
55125, 236, 237, 238, 239
66170, 171, 172,173,174
77182,230, 231,232,247
88100,101,246 ,254
991,11,12,13,14, 15
10102,3,4,5,6,7, 8
111127,29,30,32, 33
1212100,101,246 ,255
1313125, 236, 237, 238, 240
1414170, 171, 172,173,175
1515182,230, 231,232,248
1616100,101,246 ,255
17171,11,12,13,14, 16
18182,3,4,5,6,7, 9
191927,29,30,32, 34
2020100,101,246 ,256
2121125, 236, 237, 238, 241
2222170, 171, 172,173,176
2323182,230, 231,232,249
2424100,101,246 ,256
25251,11,12,13,14, 17
Sheet2


I want to transpose the data into like this from column C onwards without the commas


Book2
CDEFGHIJKLMNOPQRSTUVWXYZAA
112345678910111213141516171819202122232425
26879
36980
47081
57182
67283
7
8
9
10
11
12
13
Sheet2
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Assuming free columns off to the right, try this with a copy of your workbook.

VBA Code:
Sub Split_Transpose()
  Application.ScreenUpdating = False
  With Range("A1", Range("B" & Rows.Count).End(xlUp))
    .Offset(, .Rows.Count + 5).Value = .Value
    .Offset(, .Rows.Count + 6).Resize(, 1).TextToColumns DataType:=xlDelimited, Comma:=True, Space:=False, Other:=False
    .Offset(, .Rows.Count + 5).CurrentRegion.Copy
    .Cells(1, 3).PasteSpecial Transpose:=True
    .Offset(, .Rows.Count + 5).CurrentRegion.ClearContents
  End With
  Application.ScreenUpdating = True
End Sub
 
Upvote 0
Solution
Assuming free columns off to the right, try this with a copy of your workbook.

VBA Code:
Sub Split_Transpose()
  Application.ScreenUpdating = False
  With Range("A1", Range("B" & Rows.Count).End(xlUp))
    .Offset(, .Rows.Count + 5).Value = .Value
    .Offset(, .Rows.Count + 6).Resize(, 1).TextToColumns DataType:=xlDelimited, Comma:=True, Space:=False, Other:=False
    .Offset(, .Rows.Count + 5).CurrentRegion.Copy
    .Cells(1, 3).PasteSpecial Transpose:=True
    .Offset(, .Rows.Count + 5).CurrentRegion.ClearContents
  End With
  Application.ScreenUpdating = True
End Sub
Thank you :)
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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