如何保持一个变量恒定,其他一个变化与Excel中的行 [英] How to keep one variable constant with other one changing with row in excel
问题描述
=(B1 + 4)/(A1)
我如何做到这一点,如果我拖动单元格进行跨多个单元格的计算,只有B1值更改,而A1总是引用该单元格,而不是转到A2,A3等。
使用此窗体:
=(B0 + 4)/ $ A $ 0
$
告诉excel在将公式粘贴到新单元格时不调整该地址。
由于您拖曳行,您只需冻结行部分:
= (B0 + 4)/ A $ 0
键盘快捷键
评论者有助于指出,您可以使用这些键盘快捷键在当前所选单元格中切换公式的相对寻址:
- Windows: f4
- Mac:命令 T
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)
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.?
Use this form:
=(B0+4)/$A$0
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: CommandT
这篇关于如何保持一个变量恒定,其他一个变化与Excel中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!