
上QQ阅读APP看书,第一时间看更新
2.5.3 了解运算优先级
Excel公式中的运算是分级的,和初中课本的分级制一致。例如乘法运算优先于加法,而乘幂运算则优先于乘法等。
运算的优先级是针对运算符而言的,表2-2提供了各种运算的优先级顺序。
表2-2 运算符的优先级

还需要补充一点,对于同级的运算符,采用从左到右的优先顺序。
实际工作中常需要改变这种优先顺序,唯一的方法是采用括号“()”。例如:

第一个公式采用了默认的运算优先级,第二个公式采用括号改变了运算优先级。图2-32和图2-33所示分别是以上两个公式的计算优先级图示。

图2-32 默认运算优先级

图2-33 改变运算优先级