Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Converting Text to Values.

Converting Text to Values

Written by Allen Wyatt (last updated June 5, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


5

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. Display the Home tab of the ribbon.
  8. Click the down-arrow under the Paste tool and then select Paste Special. Excel displays the Paste Special dialog box. (See Figure 1.)
  9. Figure 1. The Paste Special dialog box.

  10. Make sure the Values radio button is selected.
  11. Click on OK. All your formulas are replaced with actual values.
  12. Format the column using a desired Time format.
  13. 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. Display the Data tab of the ribbon.
  3. Click the Text to Columns tool. Excel launches the Convert Text to Columns Wizard. (See Figure 2.)
  4. Figure 2. The Convert Text to Columns wizard.

  5. Don't worry about any of the settings in the Wizard—your data should be converted just fine with the defaults.
  6. Click on Finish.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11438) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Converting Text to Values.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Understanding Point Sizes

Points are the common unit of measure for typefaces in the printing industry. They are also used quite often in Word. ...

Discover More

Changing Link References

If you use UNC paths in your links to external information, those paths may need to be changed at some point. You can ...

Discover More

Using Slashed Zeroes

To reduce the chances of confusion in presenting data, some people like to use zeroes with slashes through them. If you ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Ensuring Standard Units During Data Entry

Need to make sure that information entered in a worksheet is always in a given unit of measurement? It's not as easy of a ...

Discover More

Importing a Subset of Records

If you only want to import a portion of whatever records are in a text file, Excel provides a number of ways you can ...

Discover More

Colors No Longer Work

It can be disconcerting if you are editing a workbook and can no longer change colors for cells in the workbook. This tip ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

2024-06-05 09:09:06

Joan Koskela

I use the second suggestion whenever I have this issue. The only step I add is, after I have selected the data to convert, I format the cells to how I want the data to display (e.g., include a comma for numbers over 999). This may be a suggestion for Tim Foxen to convert his data, but I'm not sure. If this doesn't work in his situation, I would suggestion using Replace to change the decimals to commas before trying to convert.


2021-10-19 04:56:29

Leslie Glasser

Commas or decimal points are simply conventions which may be altrered in Excel. Try this:

https://www.extendoffice.com/documents/excel/5229-excel-comma-to-decimal-point.html


2021-10-18 09:55:22

Tim Foxen

Hi, neither worked. I don't think it applies to my situation - a European/south african excel version that uses commas instead of decimals and reads decimals that get imported as text. So I need to convert the text (numbers with decimals) to numbers, with commas). If you have that solution, please let me know!!


2020-04-25 22:35:58

Leslie Glasser

These methods to convert text to numbers may fail when there hidden leading or trailing characters.

This array function will remove up to 10 such hidden characters (will work as dynamic array in Excel 2016; otherwise enter with Ctrl+Shift+Enter)

=VALUE(CONCAT(SUBSTITUTE(IFERROR(VALUE(SUBSTITUTE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),".",10)),""),10,".")))

from https://www.reddit.com/r/excel/comments/8imcd1/cant_convert_text_to_numbers_tried_everything/

(Author: dm_parker0)


2020-04-25 10:13:53

Mark Watson

If this is a task that needs to be done repeatedly I suggest using Power Query (Get & Transform).


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.