Separate numbers to the columns

shimaa01234

Active Member
Joined
Jun 24, 2014
Messages
446
I want to separate the following numbers, and columns to respond but the latter figure becomes the first number like this:
844800
1188110
511500
933900
1600610
1700710
1822810
1911910

<colgroup><col style="width:48pt" span="5" width="64"> </colgroup><tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Assuming numbers are in column A and NONE of them are longer 4 digits in length

in B1
=MID(RIGHT("000"&$A1,4),4-(COLUMN()-2),1)
copy across to column E
then copy down the column

@CHRIS: Looks like he's after the first column reversed with leading digits to bring the number to 4 characters in length
 
Upvote 0
Hi, here is one way - the formula in B2 is copied down and across.

Excel Workbook
ABCDE
2844800
31188110
4511500
5933900
61600610
71700710
81822810
91911910
Sheet1
 
Upvote 0
.
.

If you want a macro to achieve this, try the following code:

Code:
Sub SplitNumbers()

    Dim WRng As Range
    Dim Cell As Range
    Dim Lgth As Byte
    Dim i As Byte
    
    'Exit if worksheet not active
    If TypeName(ActiveSheet) <> "Worksheet" Then Exit Sub
    
    'Set range to work with
    With ActiveSheet
        Set WRng = Intersect(.Columns("A"), .UsedRange)
    End With
    
    'Loop through cells and
    'split the characters...
    
    For Each Cell In WRng
        Lgth = Len(Cell.Value)
        If Lgth > 0 Then
            For i = 1 To Lgth
                Cell.Offset(0, i).Value = Mid(Cell.Value, i, 1)
            Next i
        End If
    Next Cell
        
End Sub
 
Upvote 0
Solutions fantastic
Thank you very much Mr. "FormR" on this wonderful formula
Thank you Mister, "gpeacock" this wonderful "code"
Thank you very much Mr. "special-99" on this formula but not sperate more than 4 numbers
 
Upvote 0

Forum statistics

Threads
1,214,400
Messages
6,119,284
Members
448,885
Latest member
LokiSonic

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