Skip to main content

Text to column in Excel by @yogendra

Using Text to Columns to Separate Data in a Single Column

Data, Data Tools, Text to Columns can be used to separate data in a single column into multiple columns, such as if you have full names in one column and need a column with first names and a column with last names. When you select the command, a wizard dialog box opens to help you through the process. In step 1 of the wizard, select whether the text is Delimited or Fixed Width (see the next sections for definitions of Delimited and Fixed Width). In step 2, you provide more details on how you want the text separated. In step 3, you tell Excel the basic formatting to apply to each column.
If you have data in the columns to the right of the column you are separating, Excel overwrites the data. Be sure to insert enough blank columns to not overwrite your existing data before beginning Text to Columns. See the section “Inserting an Entire Row & Column” in chapter 2, “Working with Workbooks, Sheets, Rows, Columns, and Cells,” for instructions on how to insert columns.

Working with Delimited Text

Delimited text is text that has some character, such as a comma, tab, or space, separating each group of words that you want placed into its own column. To separate delimited text into multiple columns, follow these steps:
  1. Highlight the range of text to be separated.
  2. Go to Data, Data Tools, Text to Columns. The Convert Text to Columns Wizard opens.
  3. Select Delimited from step 1 of the wizard, as shown in Figure 3.6, and click Next.
    Figure 3.6
    Figure 3.6. Select the Delimited option to separate text joined by delimiters, such as commas, spaces, or tabs.
  4. Select one or more delimiters used by the grouped text, as in Figure 3.7, and click Next.
    Figure 3.7
    Figure 3.7. Select the Delimited option to use the comma as a delimiter between the city, state, and ZIP Code.
    If you need more than one delimiter but one of the delimiters is used normally in the text, such as the space between city names and the space between a state and ZIP Code (Sioux Falls, SD 57057), consider running Text to Columns twice: once to separate the city (Sioux Falls) from the state ZIP Code (SD 57057) and again to separate the state and ZIP Code.
  5. For each column of data, select the data format. For example, if you have a column of ZIP Codes, you need to set the format as Text so any leading zeros are not lost. But be warned—setting a column to Text prevents Excel from properly identifying formulas entered into that column.
  6. Click Finish. The text is separated, as shown in Figure 3.8.
    Figure 3.8
    Figure 3.8. Using Text to Columns with a comma delimiter separated the city from the state and ZIP Code. Run the wizard again on the state ZIP Code column with a space as a delimiter to split up that data.

Working with Fixed-Width Text

Fixed-width text describes text where each group is a set number of characters. You can draw a line down all the records to separate all the groups, as shown in Figure 3.9. If your text doesn’t look like it’s fixed width, try changing the font to a fixed-width font, such as Courier. It’s possible that it’s fixed-width text in disguise.
Figure 3.9
Figure 3.9. Use the Fixed Width option when each group in the data has a fixed number of characters.
To separate fixed-width text into multiple columns, follow these steps:
  1. Highlight the range of cells that includes text to be separated.
  2. Go to Data, Text to Columns.
  3. Select Fixed Width from step 1 of the wizard and click Next.
  4. Excel will guess at where the column breaks should go, as shown in Figure 3.9. You can move a break by clicking and dragging it to where you want it, insert a new break by clicking where it should be, or remove a break by double-clicking it. Click Next.
    Don’t worry about leading spaces—Excel will remove them for you.
  5. For each column of data, select the data format. For example, if you have a column of ZIP Codes, you need to set the format as Text so any leading zeros are not lost, as shown in Figure 3.10. But be warned—setting a column to Text prevents Excel from properly identifying formulas entered into that column.
    Figure 3.10
    Figure 3.10. In step 3 of the wizard, set the format of each column. If you have numeric text, such as ZIP Codes, make sure you configure the wizard to treat the column as text so you don’t lose any leading zeros.

Comments

Interactive Blogposts

Top 100 Useful Excel Macro [VBA] Codes Examples

Yogendra98.blogpost.com You can automate small as well as heavy tasks with VBA codes. And do you know with the help of macros, you can break all the limitations of Excel which you think Excel has? So today, I have listed some of the useful codes e xamples to help you become more productive in your day to day work. You can use these codes even if you haven't used VBA before that. All you have to do just paste these codes in your VBA editor. These codes will exactly do the same thing which headings are telling you. For your convenience, please follow these steps to add these codes to your workbook. Before you use these codes, make sure you have your developer tab on your Excel ribbon to access VB editor. If you don't have please use these simple steps to  activate developer tab . Once you activate developer tab, you can use below steps to paste a VBA code into VB editor. Don't Forget:   Make sure to  download thi...

29 Incredibly Useful Websites You Wish You Knew Earlier@yogendra

Share Pin it Tweet Share Email There are so many wonderful websites around, and it is difficult to know each and every one of them. The below list provides some of those websites that I find particularly helpful, even though they are not as famous or as prevalent as some of the big names out there. 1.  BugMeNot Are you bugged constantly to sign up for websites, even though you do not wish to share your email? If yes, then BugMeNot is for you. Instead of creating new logins, BugMeNot has shared logins across thousands of websites which can be used. . 2.  Get Notify This nifty little website tracks whether the emails sent by you were opened and read by the receiver. Moreover, it also provides the recipient’s IP Address, location, browser details, and more. 3.  Zero Dollar Movies If you are on a constant lookout of free full length movies, then Zero Dollar movies provides a collection of over 15,000 movies in multipl...

рдиेрд▓्рд╕рди рдоंрдбेрд▓ा

рдордИ 2008 рдоें рдоंрдбेрд▓ा рджрдХ्рд╖िрдг рдЕрдл्рд░ीрдХा рдХे рд░ाрд╖्рдЯ्рд░рдкрддि рдкрдж рдмрд╣ाрд▓ 10 рдордИ 1994 – 14 рдЬूрди 1999 рд╕рд╣ाрдпрдХ рдеाрдмो рдо्рд╡ूрдпेрд▓рд╡ा рдо्рдмेрдХी рдПрдл рдбрдм्рд▓्рдпू рдбी рдХ्рд▓ेрд░्рдХ рдкूрд░्рд╡ा рдзिрдХाрд░ी рдПрдл рдбрдм्рд▓्рдпू рдбी рдХ्рд▓ेрд░्рдХ рдЙрдд्рддрд░ा рдзिрдХाрд░ी рдеाрдмो рдо्рд╡ूрдпेрд▓рд╡ा рдо्рдмेрдХी рдЬрди्рдо 18 рдЬुрд▓ाрдИ 1918   рдо्рд╡ेрдЬ़ो , рдХेрдк рдк्рд░ांрдд,  рджрдХ्рд╖िрдг рдЕрдл़्рд░ीрдХा рдоृрдд्рдпु 5 рджिрд╕рдо्рдмрд░ 2013 (рдЙрдо्рд░ 95) рд╣्рдпूрдЯрди,  рдЬोрд╣ाрди्рд╕рдмрд░्рдЧ , рджрдХ्рд╖िрдг рдЕрдл़्рд░ीрдХा рдЬрди्рдо рдХा рдиाрдо рд░ोрд▓ीрд╣्рд▓рд▓ा рдоंрдбेрд▓ा рд░ाрд╖्рдЯ्рд░ीрдпрддा рджрдХ्рд╖िрдг рдЕрдл़्рд░ीрдХी рд░ाрдЬрдиीрддिрдХ рджрд▓ рдЕрдл्рд░ीрдХрди рдиेрд╢рдирд▓ рдХांрдЧ्рд░ेрд╕ рдЬीрд╡рди рд╕ंрдЧी рдПрд╡рд▓िрди рдирдЯोрдХो рдоेрд╕ (рд╡ि 1944–1957; рддрд▓ाрдХ) рд╡िрдиी рдорджिрдХिрдЬ़ेрд▓ा (рд╡ि 1958–1996; рддрд▓ाрдХ़) рдЧ्рд░ाрд╢ा рдоैрдЪрд▓ (рд╡ि 1998–2013; рдоृрдд्рдпुрдкрд░्рдпंрдд) рдмрдЪ्рдЪे рдоेрдбिрдХा рдеेрдордмेрдХрд▓ рдоंрдбेрд▓ा рдоैрдХрдЬ़िрд╡ рдоंрдбेрд▓ा рдоैрдХрдЧाрдеो рд▓ेрд╡ाрдиिрдХा рдоंрдбेрд▓ा рдоैрдХрдЬ़िрд╡ рдоंрдбेрд▓ा рдЬ़ेрдиाрдиी рдоंрдбेрд▓ा рдЬ़िрдирдЬ़िрд╕्рд╡ा рдоंрдбेрд▓ा рдиिрд╡ाрд╕ рд╣्рдпूрдЯрди рдПрд╕्рдЯेрдЯ, рдЬोрд╣ाрдирд╕рдмрд░्рдЧ, рдЧौрдЯेंрдЧ, рджрдХ्рд╖िрдг рдЕрдл़्рд░ीрдХा рд╢ैрдХ्рд╖िрдХ рд╕рдо्рдмрдж्рдзрддा рдпूрдиिрд╡рд░्рд╕िрдЯी рдСрдл़ рдлोрд░्рдЯ рд╣ेрд░ рдпूрдиिрд╡рд░्рд╕िрдЯी рдСрдл़ рд▓ंрджрди рдПрдХ्рд╕рдЯрд░्рдирд▓ рд╕िрд╕्рдЯрдо рдпूрдиिрд╡рд░्рд╕िрдЯी рдСрдл़ рд╕ाрдЙрде рдЕрдл्рд░ीрдХा рдпूрдиिрд╡рд░्рд╕िрдЯी рдСрдл़ рдж рд╡िрдЯрд╡ाрдЯрд░рд╕्рд░ांрдб рдзрд░्рдо рдИрд╕ाрдИ ( рдоेрдеोрдбिрдЬ़्рдо ) рд╣рд╕्рддाрдХ्рд╖рд░ рдЬाрд▓рд╕्рдерд▓ www...