Link to home
Start Free TrialLog in
Avatar of Ian Bell
Ian BellFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Import comma separated data from a single cell

I would like to display the comma separated numbers contained in a single cell into individual cells.
As under

Before
 A1
3.49,4.90,1,-3.49,9870.03
After
A1       A2        A3         A4          A5
3.49    4.90      1         -3.49       9870.03

Many Thanks
Ian
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Try this....

Sub SplitCommaSeparatedCellIntoMultipleCells()
Dim arr
arr = Split(Range("A1").Value, ",")
Range("A1").Resize(UBound(arr) + 1).Value = Application.Transpose(arr)
End Sub

Open in new window

Avatar of Ian Bell

ASKER

Hi Sktneer,
Thanks for this, however I am a novice when it comes to code. Can you tell me where to enter it and the steps to do so
Thanks
Ian
ASKER CERTIFIED SOLUTION
Avatar of Professor J
Professor J

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, that worked a treat.