Stopping Feet and Inches from Converting to Dates

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


9

Jane regularly copies information from a website that displays height in feet and inches in the format feet-inches. For example, 6-4 represents 6' 4". Excel seems to insist on this being a date, so Jane wonders if there is a way to make Excel see these measurements as text when she pastes them.

This is a case of Excel being needlessly helpful in converting the data you are pasting. Assuming that you are pasting tabular data from the website, the solution is to simply change how you are doing the pasting:

  1. Figure out which column will receive the measurements and format that column as text.
  2. Select the information on the website and press Ctrl+C. This copies the information to the Clipboard.
  3. Select the cell in your worksheet where you want the pasted information to be placed.
  4. Display the Home tab of the ribbon.
  5. Click the down-arrow next to the Paste tool and choose the Paste Values option. (If you cannot see the option, choose Paste Special and choose it in the resulting dialog box.)

The result is that no formatting from the website is maintained, and Excel will not overwrite any formatting you've done in the worksheet. Thus, the formatting you did in step 1 will remain, and the feet and inches will not be converted to dates.

If you mess up and paste the website data normally (using Ctrl+V), then you can convert the measurements from dates back to measurements by using the following formula:

=MONTH(A1) & "-" & DAY(A1)

This formula returns a text value that is the original measurement, as you wanted. You can then use Paste Values to convert the formulas in the cells to the results of those formulas.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8294) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

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

Moving Through a Table in a Macro

Do you need to step through a table, cell by cell, in a macro? It's easy to do using the Move method, as described in ...

Discover More

Quickly Transposing Cells

If you want to turn a range of cells by 90 degrees within a worksheet, you need to understand how Excel can handle the ...

Discover More

Shortcut Key for Non-Breaking Space

Most of the time you'll use regular spaces between words in a document, but there may be times you want to use a special ...

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)

Getting Rid of All Rows Except the One for the Latest Date

As you use Excel to collect data over time, sometimes winnowing out the latest data can present a challenge. Here are a ...

Discover More

Copying Rows between Worksheets Based on a Text Value

Want to move data from one worksheet to another based on a text value in a column. There are a couple of ways you can ...

Discover More

Automatically Moving from Cell to Cell when Entering Data

As you enter data in a worksheet, you may want to have Excel automatically move from cell to cell based on the length of ...

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 two more than 7?

2024-04-17 06:41:52

kiwerry

@ J. Woolley: Thanks very much for the tip regarding the keyboard shortcut to the QAT buttons!


2021-01-05 12:38:22

Jane Lawson

I have found another solution. Before copying and pasting, set the format to "text" of the column that will contain the feet and inches . Then "Paste Special" using the "text" option


2020-10-06 10:40:12

Jane Lawson

Thank you, Peter!! That made life a lot easier.


2020-10-05 04:45:09

Peter Atherton

@Jane Lawson
Have you tried using Data, Transform? There are plenty of videos on this and once you have done it once it will then remember the steps for next time. If the data is always from the same source it will save lots of time.


2020-09-29 13:51:04

Stacey M Rogers

Do you have videos of tips?


2020-09-26 14:00:12

Jane Lawson

Thank you for your help, but it does not quite solve my specific problem. The offending data is in one column of tabular information and I cannot simply copy just the column -- I must copy the whole table. When I try to Paste Special, I am not given a Paste Values option so am left with only the Text option. And I am still left with the oddity of how to handle 6-0 (for 6' 0"). I was hoping that there was a way to convert the resultant copied column through a format change.

I have resorted to a inserting a column adjacent to the offending column and inserting the following formula in the new column: =CONCATENATE(IF(MONTH(E2)=6,"6-","5-"),IF(YEAR(E2)=2000, "0",DAY(E2))) where the offending column is column E. I then hide column E


2020-09-26 13:25:28

Ray McAllister

This solves a problem I’ve suffered for a long time Many times I’ve copied to Excel long lists of chemical codes of the format:
123456-78-9
The first number may be 1 to 6 digits. If it is between values 1900 and 9999; and second number is 01 to 12; and third number is >0, Excel wants to interpret it as a date value (yyyy-mo-d).


2020-09-26 10:41:04

J. Woolley

I have Paste Values in the 4th position on my Quick Access Toolbar; therefore, Alt+4 is its keyboard shortcut.
I also recommend PureText: http://stevemiller.net/PureText/
PureText works with any app. I use Ctrl+Shift+V for my PureText keyboard shortcut (a.k.a. Hotkey).


2020-09-26 07:11:13

Mark

For us keyboard-centric users:
Alt-E, S opens the Paste Special dialog box

Excel will open 1 of 2 Paste Special dialog boxes based on the contents of the clipboard

1.) It appears that if Excel thinks the clipboard contents are formatted text such as a hyperlink, sentence, etc. the Paste Special version gives some or all choices for pasting as Text, Unicode Text, HTML, hyperlink

2.) If Excel thinks the clipboard contents are data it shows the Paste Special dialog box with the "Values" choice. From the keyboard Alt-E, S, V provides an extremely fast Paste Special Values.

I frequently forget to Paste Special and when I look at the cell contents interpreted by Excel I'll mutter "Crap", Ctrl-Z (undo), followed by Alt-E, S, V


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.