(Value)在Microsoft Excel中,(Microsoft Excel)值是一个令人困惑的术语。从数据单元格的实际值到函数甚至错误,电子表格应用程序中有许多称为“值”的东西。以下是其中的概要。
其中大多数并不是您基本了解 MS-Excel 所需要了解的内容(things you need to know for a basic understanding of MS-Excel),但如果您对电子表格应用程序中的各种值定义感到困惑,则值得研究一下。或者只是想更全面地了解Excel。

数据值
工作表中值的第一个也是最明显的用途是引用Excel支持的数据类型。每个单元格可以有不同类型的值,从而限制了可以对它们执行的数学运算的类型。
这些是 Excel 支持的所有值类型:
- 数字 – 数字(Number – Number)包括您可以输入的所有数值,包括电话号码或货币等。请记住,这些通常以不同的方式显示,但在幕后转换为纯数字。
- 文本 –(Text – Text)显然,文本意味着输入到单元格中的任何字符串。Excel并不特别关心文本是什么,因此它会将任何未识别为其他有效类型的数据分类为文本值。其中包括日期和地址,尽管它们的格式将它们区分开来。
- 逻辑(Logical)–逻辑(Logical)数据类型仅保存布尔值,即。对(TRUE)或错(FALSE)。虽然它看起来只是大写文本,但Excel(Excel)将其视为二进制值,并且可以在逻辑运算中使用。
- 错误 – 当函数或操作无法执行时会生成错误值。此类值将出现在您预期最终结果的单元格中,通知您出现了问题。您可以在Excel(Excel)中看到多种类型的错误,我们稍后将详细讨论其中一种错误。

值函数
有许多函数(many functions)可用于编写Excel公式。它们的范围从简单的操作(例如减法或求平均值)到生成随机数之类的操作。
VALUE函数是(VALUE)Excel中另一个鲜为人知的函数。简而言之(Simply),如果可以的话,
它将文本转换为其数值。(converts text into its numeric value)
例如,您可以使用VALUE将日期转换为纯数值。这也适用于时间值以及使用相同的语法。

请注意,这不一定对应于任何实际值(例如天数或周数),而是Excel用于表示日期的序列号。但这样的转换有什么用呢?
即使生成的值没有意义,也可以用于在数学上比较相似类型的数据。您可以减去这些数字来找出差异,或者找出哪个更大。
像这样的东西:

我们没有看到VALUE函数被频繁使用的原因有两个。一是需要该函数的场景很少,需要计算时直接输入数值即可。第二,现代Excel实际上非常擅长在需要时将表示数字的字符串转换为数值。
我们上面使用的相同示例可以在没有VALUE(VALUE)函数的情况下编写,并且将以相同的方式工作:

例如,如果您要比较货币值,即使您省略了VALUE函数, (VALUE)Excel也会自动将数据转换为适当的格式并执行计算。这就没有什么理由去学习和使用该函数了。
价值!错误
我们已经在数据类型部分讨论了错误值,但有一个错误值需要进一步研究。那是因为它也被命名为#VALUE!。
此错误很容易理解 - 如果您尝试对包含不正确数据类型(例如文本字符串)的单元格运行数学运算,Excel将无法计算答案,而是抛出 # VALUE错误。

要修复此错误,您需要更正单元格引用并确保其中仅存在数字数据。空白(Blank)单元格不应触发错误,但有时单元格可能会输入空格,这些空格会注册为文本。
特殊功能
Excel中的许多函数都旨在返回有用的值。有些是恒定的,而另一些则取决于某些条件。
例如,您可以使用 PI() 在任何计算中获取 pi 的固定值。另一方面,
RAND () 在使用时会生成一个随机数。(RAND)

这些值仅在使用各自的函数时创建,因此只能通过公式插入。一旦放入单元格中,结果值就像具有数值的普通数据类型一样。
Excel中值(Value)最重要的用法是什么?
Excel通过使用相同的名称来调用多个事物,从而使术语“值”变得更加混乱。公平地说,处理数字数据的电子表格应用程序比大多数应用程序更有理由过度使用该词。
在大多数情况下,您需要关心的唯一值是单元格中存在的数据类型。#值(VALUE)!错误(Error)实际上并不常见,因为您很少会在用于数字的字段中输入文本。
VALUE函数更加罕见,因为很少有情况需要您将文本字符串转换为数字。(VALUE)在大多数情况下(特别是在处理货币时),转换将自动发生。
What Is a “Value” in Microsoft Excel?
Value is a confusing term in Microsoft Excel. From actual values of data cells tо a function and even an error, there аre many things called “value” in the spreadsheet application. Here is a rundown of them.
Most of these aren’t things you need to know for a basic understanding of MS-Excel, but are worth looking into if you are confused by the various definitions of value in the spreadsheet app. Or just want a more complete understanding of Excel.

Data Values
The first and the most obvious use of values in a worksheet is to refer to data types supported by Excel. Each cell can have a different type of value, limiting the kind of mathematical operations that can be performed on them.
These are all the types of values supported by Excel:
- Number – Number includes all numeric values you can enter, including things like phone numbers or currencies. Keep in mind that these are often displayed differently, but are converted into pure numbers behind the scenes.
- Text – Text, obviously enough, means any string entered into a cell. Excel doesn’t particularly care what the text is, and so it will categorize any data not recognized as another valid type as a text value. This includes dates and addresses, though their formatting sets them apart.
- Logical – The Logical data type only holds boolean values, ie. TRUE or FALSE. While it just appears to be capitalized text, it is treated as a binary value by Excel and can be used in logical operations.
- Error – Error-values are generated when a function or operation cannot be executed. This type of value will appear in the cell where you expected the final result, informing you about what went wrong. There are multiple types of errors you can see in Excel, one of which we are going to discuss in detail later on.

The VALUE Function
There are many functions that can be used to compose Excel formulas. They range from simple operations like subtraction or finding the average to things like generating random numbers.
The VALUE function is another lesser-known function in Excel. Simply put, it converts text into its numeric value, if such a conversion is possible.
For example, you can use VALUE to convert a date into a purely numeric value. This works for time values as well using the same syntax.

Note that this doesn’t necessarily correspond to any actual value – like the number of days or weeks – but rather a serial number used by Excel to represent a date. But then what’s the use of this conversion?
Even if the value generated is meaningless, it can be used to mathematically compare similar types of data. You can subtract these numbers to find the difference, or figure out which one is greater.
Something like this:

There are two reasons why we don’t see the VALUE function used too often. One, there are very few scenarios in which the function is needed, as you can just enter numeric values when you want to perform calculations. Two, modern-day Excel is actually pretty good at converting strings that represent numbers into numeric values when required.
The same example we used above could be written without the VALUE function and will work the same way:

If you’re comparing currency values for example, Excel will automatically convert the data to the appropriate format and carry out the calculations even if you omit the VALUE function. This leaves very little reason to learn and use the function.
The #VALUE! Error
We have already discussed error values in the data types section, but one error value needs a further look. That’s because it’s also named #VALUE!.
This error is rather easy to understand – if you try to run a mathematical operation on a cell containing the incorrect data type (say a text string), Excel will fail to compute the answer and instead throw a #VALUE error.

To fix this error, you need to correct the cell references and ensure that only numeric data is present in them. Blank cells aren’t supposed to trigger the error, but sometimes a cell might have spaces entered instead, which registers as text.
Special Functions
Many functions in Excel are designed to return a useful value. Some are constant, while others depend on certain conditions.
For example, you can use PI() to get the fixed value of pi in any calculation. RAND(), on the other hand, generates a random number when used.

These values are only created when their respective function is used, and can hence only be inserted through a formula. Once put into a cell, the resultant value acts like a normal data type with a numeric value.
What Is the Most Important Usage of Value in Excel?
Excel has made the term “Value” more confusing than it needs to be by calling multiple things by the same name. To be fair, a spreadsheet application dealing with numeric data has more reason than most applications to overuse the word.
For the most part, the only values you need to concern yourself with are the data types present in a cell. The #VALUE! Error is actually not that common, since rarely will you enter text in a field meant for numbers.
The VALUE function is even rarer since very few cases will require you to convert a text string into a number. And in most of these cases (especially when dealing with currencies), the conversion will happen automatically.