Excel.Tips.Net Welcome toExcel.Tips.Net

Helpful Links

Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment

Tips.Net Store

ExcelTips FAQ
ExcelTips Premium

Learn Access Now
Free Printable Forms

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

Newest Tips

Recording a Macro

Adding a Little Animation to Your Life

Converting a Range of URLs to Hyperlinks

Making the Formula Bar Persistent

Engineering Calculations

Digital Signatures for Macros

Fixing the Decimal Point

 

Converting Text to Values

Summary: When you import information originating in a different program, Excel may not do the best job at figuring out what various pieces of that information are used for. Here's a couple of ways to quickly convert imported textual values into the numeric values they should have been all along. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)

If you are using Excel to massage data imported from another system, you know that often the data needs quite a bit of work. For instance, you might import information that represents a time value, but the data actually ends up being treated by Excel as a text string.

If you find your data in this condition, all is not lost. If you want to convert the text values into actual time values, there are several ways you can accomplish the task. The first is to follow these steps:

  1. Insert a blank column to the right of the data you need to convert.
  2. Just to the right of the first cell that has a text-formatted time value, enter the following formula. Make sure you substitute the address of the cell for A1:
  3. =VALUE(A1)
    
  4. Copy the formula down, so that each cell to be converted has the formula to its right.
  5. Select the column in which you just put the formulas.
  6. Press Ctrl+C. This copies the selected information to the Clipboard.
  7. Choose Paste Special from the Edit menu. Excel displays the Paste Special dialog box. (Click here to see a related figure.) To display this dialog box in Excel 2007, display the Home tab of the ribbon and click the down-arrow under the Paste tool at the left side of the ribbon. Select Paste Special from the resulting menu.
  8. Make sure the Values radio button is selected.
  9. Click on OK. All your formulas are replaced with actual values.
  10. Format the column using a desired Time format.
  11. Delete the original text-formatted time column.

Once you get going with this process, it is pretty quick. Not as quick, however, as the following approach:

  1. Select the cells that contain the text-formatted times. If it is an entire column, select the entire column.
  2. Choose Text to Columns from the Data menu. (In Excel 2007, select Text to Columns from the Data tab of the ribbon.) Excel launches the Convert Text to Columns Wizard. (Click here to see a related figure.)
  3. Don't worry about any of the settings in the Wizard—your data should be converted just fine with the defaults.
  4. Click on Finish.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2745) applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003 | 2007

Change Formatting Based On Your Data! Conditional formatting provides a way for you to adjust the appearance of your data based on the data itself. Discover how to put this amazingly powerful feature to work for you, today. This comprehensive volume is available in two editions.
 
Check out Excel Conditional Formatting today!