如何保持一个变量不变,另一个变量随行在excel中改变 [英] How to keep one variable constant with other one changing with row in excel
问题描述
假设我有一个单元格 A1,我想在计算中保持不变.例如,我想计算这样的值:
Lets say I have one cell A1, which I want to keep constant in a calculation. For example, I want to calculate a value like this:
=(B1+4)/(A1)
如何做到这样,如果我拖动该单元格在多行的单元格之间进行计算,只有 B1 值发生变化,而 A1 始终引用该单元格,而不是转到 A2、A3 等?
How do I make it so that if I drag that cell to make a calculation across cells in many rows, only the B1 value changes, while A1 always references that cell, instead of going to A2, A3, etc.?
推荐答案
使用这个表格:
=(B0+4)/$A$0
$
告诉 excel 在将公式粘贴到新单元格时不要调整该地址.
The $
tells excel not to adjust that address while pasting the formula into new cells.
因为你是跨行拖动,你真的只需要冻结行部分:
Since you are dragging across rows, you really only need to freeze the row part:
=(B0+4)/A$0
<小时>
键盘快捷键
评论者有用地指出,您可以使用以下键盘快捷键切换当前选定单元格中公式的相对寻址:
Keyboard Shortcuts
Commenters helpfully pointed out that you can toggle relative addressing for a formula in the currently selected cells with these keyboard shortcuts:
- Windows:f4
- Mac:命令T
这篇关于如何保持一个变量不变,另一个变量随行在excel中改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!