EXCEL:无法对if语句的结果执行函数

时间:2021-01-24 07:20:24

I have a row in an excel doc with =if(C1=1,C21,""), etc. This gives me a resulting value of 255. I can't seem to do anything with this value, if I set another cell to equal the result cell, it appears as 255 also (makes sense). If I do sum(), average(), etc. of the if result cell I get 0 as an answer (doesn't make sense). I've tried copying and pasting pasting (values only) but no luck.

我在excel doc中有一行= if(C1 = 1,C21,“”)等。这给了我一个255的结果值。如果我设置另一个单元格,我似乎无法对此值做任何事情为了等于结果单元格,它也显示为255(有意义)。如果我对if结果单元格求sum(),average()等,我得到0作为答案(没有意义)。我已经尝试过复制和粘贴粘贴(仅限值)但没有运气。

I'm trying to take the average of a row of these if statements, but am getting the #DIV/0! error. I've tried changing the if statements to =if(C1=1,C21,0) and using =averageif(C50:J50,">0") but i get the same error.

我试图取这些if语句中的一行的平均值,但我得到的是#DIV / 0!错误。我已经尝试将if语句更改为= if(C1 = 1,C21,0)并使用= averageif(C50:J50,“> 0”)但我得到了相同的错误。

1 个解决方案

#1


0  

The most likely reason is that the result isn't a number. The easiest way to check is that numbers are right justified and text is left justified.

最可能的原因是结果不是数字。最简单的检查方法是数字是正确的,文本是左对齐的。

In the image below, the top 255 is a number. The bottom is formatted as text.

在下图中,前255是一个数字。底部格式为文本。

Demo justified

演示是合理的

#1


0  

The most likely reason is that the result isn't a number. The easiest way to check is that numbers are right justified and text is left justified.

最可能的原因是结果不是数字。最简单的检查方法是数字是正确的,文本是左对齐的。

In the image below, the top 255 is a number. The bottom is formatted as text.

在下图中,前255是一个数字。底部格式为文本。

Demo justified

演示是合理的