Excel text import wizard choose columns code#
In the data below, we have an invoice code that always begins with two letters followed by a variable number of numeric digits. In this example, we will split text that has a fixed width. When we click “Finish” on the wizard, Excel separates the first and last names and we now have our new, fully populated Column B. We will also leave the destination as $A$2 so that it splits the name from its current position, and moves the last name into column B. For our example, we do not need to apply any formatting, but you could do things like specify whether the data is in the text or date format, and even set it up so that one format converts to another during the process. In the final step, we can format the content. So, we’re going to remove the check from the “Tab” and add a check to the “Space” option. In our simple example data, the first and last names are delimited by a space. In the second step, specify the delimiter character. (We’ll talk about the fixed width option in the next section.) That’s the one we’re going to choose here. Delimited means the different pieces of text you want to pull apart are separated by a special character such as space, comma, or slash. Step one is to specify how the content is separated. This opens a wizard in which you’ll perform three steps. Next, select the range of cells containing the names and then click Data > Text to Columns