Stopping Feet and Inches from Converting to Dates

by Allen Wyatt
(last updated September 26, 2020)

7

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 Office 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

Grabbing a User's Name from Excel

One of the settings you can make in Excel is to specify a user's name. This name is accessible through macros, and can ...

Discover More

Creating Sparklines

Want a cool, small chart to show what your data is doing? You need a sparkline, discussed in this tip.

Discover More

Rotate a Graphic Using the Keyboard

Rotating a graphic using the mouse is rather easy. Rotating a graphic using the keyboard is a bit trickier. This tip ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Easily Entering Dispersed Data

Need to enter information into a bunch of cells that aren't anywhere near each other in the worksheet? Here's a handy way ...

Discover More

Trimming Off All Spaces

The easy way to get rid of spaces at the beginning or end of a cell's contents is to use the TRIM function. ...

Discover More

Capitalizing Just a Surname

Changing the capitalization of text is, believe it or not, a common task in Excel. Common or not, it can be frustrating ...

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}] 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 8 + 0?

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.