对一列中的所有行使用一个公式?

发布于 2024-12-24 19:06:16 字数 227 浏览 5 评论 0原文

我在C列上有一个公式:

=IF(B2<=6,15,IF(AND(B2>6,B2<=13),20,IF(AND(B2>13,B2<=20),25,IF(AND(B2>=21),30))))

是否可以让Excel动态地知道我可能在B3上并将结果复制到C3中?

现在我正在将公式复制到 C 列的每个单元格中,以便正确计算结果。

I have a formula on say Column C:

=IF(B2<=6,15,IF(AND(B2>6,B2<=13),20,IF(AND(B2>13,B2<=20),25,IF(AND(B2>=21),30))))

Is it possible to have Excel dynamically know that I may be on B3 and copy the result into C3?

right now I am coping the formula into each cell of column C so that the results are calculated correctly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

愚人国度 2024-12-31 19:06:16

您实际上并不需要 AND,这就足够了

=IF(B2<=6,15,IF(B2<=13,20,IF(B2<=20,25, 30)))

...不确定问题是什么,是否要将公式复制到列中?如果您将该公式放入 C2 中,然后将光标放在右下角,直到看到黑色“+” - 这是“填充句柄” - 然后您可以双击它,公式将变为只要 B 列中有数据即可填充(并且单元格引用将根据需要逐行调整)...

You don't really need the ANDs, this would suffice

=IF(B2<=6,15,IF(B2<=13,20,IF(B2<=20,25,30)))

...Not sure what the problem is, do you want to copy the formula down the column? If you put that formula in C2 then put the cursor on the bottom right until you see a black "+" - this is the "fill-handle"- then you can double click that and formula will be populated as far as you have data in column B (and cell references will adjust as required row by row)....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文