Written by Allen Wyatt (last updated April 17, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
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:
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.
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!
As you use Excel to collect data over time, sometimes winnowing out the latest data can present a challenge. Here are a ...
Discover MoreWant 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 MoreAs you enter data in a worksheet, you may want to have Excel automatically move from cell to cell based on the length of ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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
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
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments