数字更改为Excel中的日期

Have you ever copied football scores, such as 3-2, and pasted them into Excel, where they magically change to dates? It's certainly annoying when a nice list of numbers change to dates in Excel, but fortunately there's an easy way to prevent that from happening.

您是否曾经复制足球比分(例如3-2)并将其粘贴到Excel中,从而神奇地更改了日期? 当一个好的数字列表在Excel中更改为日期时,这确实很烦人,但是幸运的是,有一种简单的方法可以防止这种情况的发生。

数字样本清单 (Sample List of Numbers)

If you're not quite sure what I'm talking about, copy the three numbers below, and paste them onto an Excel worksheet.

如果您不太确定我在说什么,请复制下面的三个数字,然后将其粘贴到Excel工作表中。

  • 3/4

    3/4
  • 02345

    02345
  • 1-3

    1-3

The results will vary slightly, depending on your Regional settings – Excel might see the numbers as a month/day or day/month

结果会略有不同,具体取决于您的区域设置-Excel可能会将数字视为月/日或日/月

In the screen shot below, you an see what happened when I pasted the numbers into Excel. Two of the numbers were changed to dates, and the leading zero was dropped from the other number.

在下面的屏幕快照中,您可以看到将数字粘贴到Excel中时发生的情况。 其中两个数字更改为日期,而前一个零从另一个数字中删除。

3/4 became March 4th, the leading zero was dropped from the second number, and 1-3 turned into January 3rd.

3/4变成3月4日,前导零从第二个数字掉落,而1-3变成1月3日。

numberdates05

Thanks, Excel, but that's not quite what I wanted!

谢谢,Excel,但这不是我想要的!

防止数字格式丢失 (Prevent Number Formatting Loss)

If you want to copy those types of numbers, and keep their original formatting, you just have to do a little extra work – nothing complicated.

如果要复制这些类型的数字并保持其原始格式,则只需要做一些额外的工作-没什么复杂的。

First, get the worksheet ready:

首先,准备工作表:

  • In Excel, select the columns where you're going to paste the data. If you're copying two columns from a website, select the same number of columns on the worksheet.

    在Excel中,选择要粘贴数据的列。 如果要从网站复制两列,请在工作表上选择相同数量的列。
  • Then, on the Ribbon's Home tab, in the Number group, click the drop down arrow, and click on Text – it's way down at the bottom of the list

    然后,在功能区的“主页”选项卡上的“数字”组中,单击下拉箭头,然后单击“文本” –它在列表底部
numberdates01

仔细粘贴 (Paste Carefully)

After you've got the worksheet ready, follow these steps to paste the data and keep its formatting.

准备工作表后,请按照以下步骤粘贴数据并保持其格式。

  • Select the data and copy it

    选择数据并复制
  • On the worksheet, go to the column(s) that you formatted, and right-click the starting cell where you want to paste the data

    在工作表上,转到格式化的列,然后右键单击要粘贴数据的起始单元格
  • In the popup menu, under Paste Options, click Match Destination Formatting

    在弹出菜单的“粘贴选项”下,单击“匹配目标格式”。

    numberdates02

The data will be pasted in its original formatting, instead of changing to dates.

数据将以其原始格式粘贴,而不是更改为日期。

文字数字不是实数 (Text Numbers Not Real Numbers)

Of course, the pasted data is text now, not real numbers. You won't be able to add them up, or get an average, or have other kinds of number fun.

当然,粘贴的数据现在是文本,而不是实数。 您将无法将它们加起来,无法获得平均值,也无法获得其他种类的数字乐趣。

If you decide to change the text numbers to real numbers later, there are lots of ways to do that, such as using the Text to Columns command.

如果您决定稍后将文本数字更改为实数,则有许多方法可以执行此操作 ,例如使用“文本到列”命令。

numbertext04

更多数据输入提示 (More Data Entry Tips)

For more data entry tips, and troubleshooting ideas for copying and pasting, visit the Data Entry Tips page on my Contextures website.

有关更多数据输入提示,以及有关复制和粘贴的疑难解答提示,请访问我的Contextures网站上的“数据输入提示”页面

翻译自: https://contexturesblog.com/archives/2016/06/09/numbers-change-to-dates-in-excel/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值