```
let
Source = Excel.CurrentWorkbook(){[Name="Table4"]}[Content],
Number = Table.AddColumn(Source, "Number", each Text.Select([Rawdata],{"0".."9"})),
LenRaw = Table.AddColumn(Number, "Length", each Text.Length([Rawdata]), Int64.Type),
LenNum = Table.AddColumn(LenRaw, "Length.1", each Text.Length([Number]), Int64.Type),
Subtract = Table.AddColumn(LenNum, "Subtraction", each [Length] - [Length.1], type number),
IF = Table.AddColumn(Subtract, "IF", each if [Length.1] = 0 or [Length.1] = [Subtraction] then [Subtraction] else [Subtraction]-1),
Range = Table.AddColumn(IF, "Text Range", each Text.Middle([Rawdata], 0, [IF]), type text),
TSC = Table.SelectColumns(Range,{"Rawdata", "Text Range"})
in
TSC
```