10 columns of phone numbers extracted <WORKING LINK>

HockeyDiablo

Board Regular
Joined
Apr 1, 2016
Messages
182
I have 10 columns of data and would like them all organized, any tips?


[TABLE="width: 1000"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]111-111-1111[/TD]
[TD][/TD]
[TD]222-222-2222[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]333-333-3333[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD]444-444-4444[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]555-555-5555[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]666-666-6666[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]777-777-7777[/TD]
[TD][/TD]
[TD][/TD]
[TD]888-888-8888[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]999-999-9999[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]111-111-1111[/TD]
[TD]222-222-2222[/TD]
[TD]333-333-3333[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]444-444-4444[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]555-555-5555[/TD]
[TD]666-666-6666[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]777-777-7777[/TD]
[TD]888-888-8888[/TD]
[TD]999-999-999[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



**NOT SURE WHY THE FIRST POST WAS BLANK?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Run of data sheet for results in sheet2.
Code:
[COLOR="Navy"]Sub[/COLOR] MG06Jul30
[COLOR="Navy"]Dim[/COLOR] Ray [COLOR="Navy"]As[/COLOR] Variant, n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] Ac [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] oMax [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long[/COLOR]
Ray = ActiveSheet.UsedRange.Resize(, 10)
ReDim nray(1 To UBound(Ray, 1), 1 To UBound(Ray, 2))
[COLOR="Navy"]For[/COLOR] n = 1 To UBound(Ray, 1)
    c = 0
    [COLOR="Navy"]For[/COLOR] Ac = 1 To UBound(Ray, 2)
        [COLOR="Navy"]If[/COLOR] Len(Ray(n, Ac)) [COLOR="Navy"]Then[/COLOR]
            c = c + 1
            nray(n, c) = Ray(n, Ac)
           oMax = Application.Max(oMax, c)
        [COLOR="Navy"]End[/COLOR] If
    [COLOR="Navy"]Next[/COLOR] Ac
[COLOR="Navy"]Next[/COLOR] n
[COLOR="Navy"]With[/COLOR] Sheets("Sheet2").Range("A1").Resize(UBound(Ray, 1), oMax)
   .Value = nray
   .Borders.Weight = 2
   .Columns.AutoFit
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]With[/COLOR]
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
Select the range (A1:J4)
Press F5
Special…
pick Blanks
OK
Right-click one of the selected cells
pick Delete…
pick Shift cells left
OK

Hope this helps

M.
 
Upvote 0
Run of data sheet for results in sheet2.
Code:
[COLOR=Navy]Sub[/COLOR] MG06Jul30
[COLOR=Navy]Dim[/COLOR] Ray [COLOR=Navy]As[/COLOR] Variant, n [COLOR=Navy]As[/COLOR] [COLOR=Navy]Long,[/COLOR] Ac [COLOR=Navy]As[/COLOR] [COLOR=Navy]Long,[/COLOR] c [COLOR=Navy]As[/COLOR] [COLOR=Navy]Long,[/COLOR] oMax [COLOR=Navy]As[/COLOR] [COLOR=Navy]Long[/COLOR]
Ray = ActiveSheet.UsedRange.Resize(, 10)
ReDim nray(1 To UBound(Ray, 1), 1 To UBound(Ray, 2))
[COLOR=Navy]For[/COLOR] n = 1 To UBound(Ray, 1)
    c = 0
    [COLOR=Navy]For[/COLOR] Ac = 1 To UBound(Ray, 2)
        [COLOR=Navy]If[/COLOR] Len(Ray(n, Ac)) [COLOR=Navy]Then[/COLOR]
            c = c + 1
            nray(n, c) = Ray(n, Ac)
           oMax = Application.Max(oMax, c)
        [COLOR=Navy]End[/COLOR] If
    [COLOR=Navy]Next[/COLOR] Ac
[COLOR=Navy]Next[/COLOR] n
[COLOR=Navy]With[/COLOR] Sheets("Sheet2").Range("A1").Resize(UBound(Ray, 1), oMax)
   .Value = nray
   .Borders.Weight = 2
   .Columns.AutoFit
[COLOR=Navy]End[/COLOR] [COLOR=Navy]With[/COLOR]
[COLOR=Navy]End[/COLOR] [COLOR=Navy]Sub[/COLOR]
Regards Mick


Works like a charm, thank you
 
Upvote 0
Can you use something like this? Hope this helps.


Excel 2012
ABCDEF
1111-111-1111222-222-222333-333-3333
2
3111-111-1111222-222-222333-333-3333 
Sheet1
Cell Formulas
RangeFormula
A3{=IFERROR(INDEX($A$1:$H$1,SMALL(IF($A$1:$H$1<>"",COLUMN($A$1:$H$1)-COLUMN($A$1)+1),COLUMNS($A$3:A3)))," ")}
B3{=IFERROR(INDEX($A$1:$H$1,SMALL(IF($A$1:$H$1<>"",COLUMN($A$1:$H$1)-COLUMN($A$1)+1),COLUMNS($A$3:B3)))," ")}
C3{=IFERROR(INDEX($A$1:$H$1,SMALL(IF($A$1:$H$1<>"",COLUMN($A$1:$H$1)-COLUMN($A$1)+1),COLUMNS($A$3:C3)))," ")}
D3{=IFERROR(INDEX($A$1:$H$1,SMALL(IF($A$1:$H$1<>"",COLUMN($A$1:$H$1)-COLUMN($A$1)+1),COLUMNS($A$3:D3)))," ")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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