pulphus wrote:
I know that this is a simple click "text to column" in excel but no so much in numbers
Two techniques for doing this, one with formulas, the other using a script, are described above. While I haven't tried Yvan's script, and can't speak to it, I can offer some comments on the formula example relative the the process in MS Excel (2007).
For your example (New Orleans LA 70122), fewer columns would be needed in Tables 2 and 3 than for the long original string in the OP's example.
Results for your example are essentially the same as in Excel—the
four elements of the string are placed in four columns:
New | Orleans | LA | 70122
Both processes rely on recognizing one character as a separator to determine where to break the original data string, and both split New Orleans into two columns due to the internal space in that city's name.
The process in Excel (2007), while simpler than constructing the set of tables and formulas above, is not quite the "simple click" you describe unless the original data is in CSV format (commas separating the data elements). If, as in your example, the separator is a space, there are some decisions to be made. Here's the list of steps needed in Excel 2007:
Select the data.
Click the Data tab in the Toolbar.
Click Text to Table
In the first dialogue, check to see that the Text Wizard has correctly identified the data as "Delimited".
If the Delimited radio button is selected, Click Next
If not,click the Delimited radio button to change the data type from "Fixed width" to Delimited.
Click Next.
In the second dialogue, Click the Space checkbox to select the character to recognize as a separator.
Click Next
In the third dialogue, Select the column (4) that will hold the ZIP Code.
Click the Text radio button to change the format of this column from General to Text.
(For data sets larger than the single example, repeat the above step for every column into which the ZIP Code might be placed)
Click Finish.
Regards
Barry