Given the following line:
"Data 1998 1999 2000 2001 2002 2003 2004 2005 2006"
I would like to be able to take a row and put the data in 10 separate columns in an Excel spreadsheet. I am working on a custom function, but it is not working yet.
Has anyone already decided this?
thank
You can also do this using the formula: http://www.excelforum.com/excel-general/591897-text-to-columns-but-using-a-formula.html
Or use creamyegg code.
- . VBA Split(), , . A1:I1 :
Split()
A1:I1
Dim varArray As Variant varArray = Split("Data 1998 1999 2000 2001 2002 2003 2004 2005 2006", " ") ActiveSheet.Range(Cells(1, 1), Cells(1, UBound(varArray))).Value = varArray