跳到主要内容

如何在Excel中将文本更改或转换为数字?

当您从某些来源(例如Access或文本文件)导入数据时,数字有时可能会在单元格中格式化为文本。 如果数字被格式化或存储为文本,则计算和排序将出错。 这是在Microsoft Excel中将文本转换为数字的几种方法。

doc将文本转换为number6 -2 doc将文本转换为number7

使用Excel中的错误检查规则将文本转换为数字

使用 Kutools for Excel 快速将文本转换为数字

使用选择性粘贴将文本转换为数字


使用Excel中的错误检查规则将文本转换为数字

一般来说,当数字格式化或以文本形式存储在单元格中时,会出现错误符号 文档文本到数字 7 在单元格的左上角。 选择单元格后,它显示一个错误按钮 文档更改文本编号 5 在此单元之前。 点击错误按钮 文档更改文本编号 5,它将显示一个菜单,您可以单击 转换成数字命令项将单元格中的文本转换为数字。 看截图:

doc将文本转换为number1

然后,存储为文本的数字已转换为数字。 然后对其他单元格重复此方法。

如果没有错误迹象 文档文本到数字 7 在单元格的左上角,您还可以使用 错误检查 下命令 公式 标签来处理它。 请这样做:

1。 点击 公式 > 错误检查,请参见屏幕截图:

doc将文本转换为number2

2.然后在 错误检查 对话框,单击 转换成数字 按钮。 并反复单击此按钮以将其他文本转换为数字。

doc将文本转换为number3

3.当最后一个单元格文本更改为数字时,它将弹出提示框,提醒您所有文本已转换为数字。

doc将文本转换为number4

但是,当有大量数据需要更改时,此方法将很繁琐且耗时。


使用 Kutools for Excel 快速将文本转换为数字

如果你已经安装 Kutools for Excel 在您的计算机上 单元中的力值 工具将帮助您将所有存储为文本的数字转换为数字,而又不会丢失原始格式和样式。

Kutools for Excel 包括300多个便捷的Excel工具。 30天免费试用,不受限制。 立即获取.

1。 点击 库工具 > 更多 > 单元中的力值…。 看截图:

doc将文本转换为number8

2.然后显示 单元中的力值 对话框。 只需指定包含以文本形式存储的数字的范围,然后检查 文字转数字 选项。

doc将文本转换为number9

3.然后单击 OK or 使用,所有存储为文本的数字将转换为所选范围内的数字。

Tips::要使用此功能,您应该安装 Kutools for Excel 首先,请 点击下载并享受 30 天免费试用 现在。

使用选择性粘贴将文本转换为数字

第三种方法是通过使用 Microsoft Excel 中的“选择性粘贴”命令进行计算来转换存储为文本的数字。

1.请在空白单元格中输入数字0并复制;

2.选择包含以文本形式存储的数字的范围单元格;

3.右键单击所选范围,然后选择 选择性粘贴 上下文菜单中的选项;

4.然后显示 选择性粘贴 对话框,然后检查 所有类型 选项和 地址 选项;

doc将文本转换为number5

5。 点击 OK,并且所有存储为文本的数字都将转换为数字。 查看屏幕截图:

doc将文本转换为number6 -2 doc将文本转换为number7
Tips:
  • 如果您不想在将文本转换为数字后更改单元格格式,请选择粘贴为 ,在 选项。
  • 操作 选项,请选择 地址 选项或 减去 选项。
  • 此方法的缺点:如果范围包含空白单元格,它将用数字0填充所有空白单元格。
Comments (4)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How to translate a number into text in different languages?How to translate a number into text in different languages on Excel ?I use an online service https://numbertowords.org/ and it's not very convenient for me.
Help me, Please!
This comment was minimized by the moderator on the site
Sir i want to change letter into number in excel 2007
i am working in shop where prices are mentioned in code
examle
ioxzz = prices 34800
a = 1
e = 2
i = 3
o = 4
u = 5
v = 6
w = 7
x = 8
y = 9
z = 0
plz send me formula i change these code price into value if any one now
This comment was minimized by the moderator on the site
Kathy, Your formula worked perfectly. This approach is exactly what I needed for my reports. THANK YOU!
This comment was minimized by the moderator on the site
I run a report weekly that requires copying and pasting approximately 7000 rows of data exported from a system. Recently some changes were made so that the numbers were coming out stored as text. The data includes a selection of actual text entries and the rest numbers stored as text. This data gets copied and pasted into a master template which then feeds other sheets/reports, but I needed the numbers to be stored as numbers. Due to the volume of the data and the fact that I'm not the only one performing this task (and some of the others are not Excel savvy) I needed to try and automate this process. I tried the =A1*1 formula and it worked for the numbers but the text I got a #VALUE! error. After much fiddling, I came up with the formula below and it works perfectly! =IF(AND(A1="Yes"),"Yes",IF(AND(A1="Not applicable"),"Not applicable",IF(AND(A1="No"),"No",A1*1)))
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations