跳到主要內容

如何在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 快速將文字轉換為數字

如果你已經安裝 Excel的Kutools 在您的計算機上 單元中的力值 工具將幫助您將所有存儲為文本的數字轉換為數字,而又不會丟失原始格式和样式。

Excel的Kutools 包括300多個便捷的Excel工具。 30天免費試用,不受限制。 立即獲取.

1。 點擊 庫工具 > 更多 > 單元中的力值…。 看截圖:

doc將文本轉換為number8

2.然後顯示 單元中的力值 對話框。 只需指定包含以文本形式存儲的數字的範圍,然後檢查 文字轉數字 選項。

doc將文本轉換為number9

3.然後單擊 OK or 登記,所有存儲為文本的數字都將轉換為所選範圍內的數字。

尖端:要使用此功能,您應該安裝 Excel的Kutools 首先,請 點擊下載並獲得 30 天免費試用

使用選擇性粘貼將文本轉換為數字

第三種方法是透過使用 Microsoft Excel 中的「選擇性貼上」命令進行計算來轉換以文字形式儲存的數字。

1.請在空白單元格中輸入數字0並進行複制;

2.選擇包含以文本形式存儲的數字的範圍單元格;

3.右鍵單擊所選範圍,然後選擇 選擇性粘貼 上下文菜單中的選項;

4.然後顯示 選擇性粘貼 對話框,然後檢查 全部 選項和 加入 選項;

doc將文本轉換為number5

5。 點擊 OK,並且所有存儲為文本的數字都將轉換為數字。 查看屏幕截圖:

doc將文本轉換為number6 -2 doc將文本轉換為number7
保養竅門:
  • 如果您不想在將文本轉換為數字後更改單元格格式,請選擇粘貼為 ,在 選項。
  • 操作 選項,請選擇 加入 選項或 減去 選項。
  • 此方法的缺點:如果範圍包含空白單元格,它將用數字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