Dear Dave,
The delimiter is sort of moot.
The data string length of the text is different for each row.
Never-the-less, the R2Column function parses it fine using fixed width. The
problem is that the Macro recorder cannot record a function where it assigns
a value to a function.
For example, the following is an example of unparsed data with each segment
equal to one cell:
7770 6255 7340 7250 7725 8578 8511 9837 11185 9250 9775 1096
870 855 735 1050 455 455 420 775 60 0 35 420
116307 96218 105543 103700 105331 93772 112356 124627 115915 101216 122717
118983
The recorded macro to parse these three cells into 12 columns of data
correctly which was generated from the original posting commands is as
follows:
Selection.TextToColumns Destination:=Range("D8"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(4, 1), Array(9, 1), Array(14,
1), Array(19, 1), _
Array(24, 1), Array(29, 1), Array(34, 1), Array(39, 1), Array(45,
1), Array(50, 1), Array( _
55, 1))
Range("D9").Select
Selection.TextToColumns Destination:=Range("D9"),
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(3, 1), Array(7, 1), Array(11,
1), Array(16, 1), _
Array(20, 1), Array(24, 1), Array(28, 1), Array(32, 1), Array(35,
1), Array(37, 1), Array( _
40, 1))
Range("D10").Select
Selection.TextToColumns Destination:=Range("D10"),
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(6, 1), Array(12, 1), Array(19,
1), Array(26, 1), _
Array(33, 1), Array(39, 1), Array(46, 1), Array(53, 1), Array(60,
1), Array(67, 1), Array( _
74, 1))
End Sub
Note that the cells are not relative when in reality it would be. Each line
has a different array solution based on the data. If I were to run this
macro on another set of data with a different length it does not and cannot
work.
All I wish to do is start on the first cell and duplicate the key strokes of :
ALT D,e
Enter
Enter
Enter
For each cell
Thanks for considering the problem.
Cordially,
PA