I'm using macro that separates input in cell eg. "1,2,3,4" into separate columns as shown in attached workbook on sheet "Current".
How could I amend macro that it would separate inputs as shown in attached workbook on the sheet "How it should be".
The input numbers will be always in range from number 1 to maximum number 20.
Sub SeparateLines()
'
'
Range("H2:H10001").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-99
Range("I2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=-21
Application.CutCopyMode = False
Selection.TextToColumns Destination:=Range("I2"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True
End Sub
Thank you for help!
Bookmarks