excel中如何保持一个变量不变而另一个变量随行变化

发布于 2024-08-20 04:29:27 字数 169 浏览 7 评论 0原文

假设我有一个单元格 A1,我希望在计算中保持不变。例如,我想计算这样的值:

=(B1+4)/(A1)

如何做到这一点,以便如果我拖动该单元格在许多行中的单元格之间进行计算,则只有 B1 值发生变化,而 A1 始终引用该单元格,而不是继续到 A2、A3 等?

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.?

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

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

发布评论

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

评论(8

爱*していゐ 2024-08-27 04:29:27

使用这种形式:

=(B0+4)/$A$0

$ 告诉 Excel 在将公式粘贴到新单元格时不要调整该地址。

由于您是跨行拖动,因此实际上只需要冻结行部分:

=(B0+4)/A$0

键盘快捷键

评论者指出,您可以使用以下键盘快捷键切换当前选定单元格中公式的相对寻址:

  • Windows:f4
  • Mac:命令T

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
讽刺将军 2024-08-27 04:29:27

有两种类型的单元格引用,充分理解它们确实很有价值。

一种是相对引用,这是您只需键入单元格:A5 时得到的内容。当您将公式粘贴或填充到其他单元格时,将调整此参考。

另一种是绝对引用,您可以通过在单元格引用中添加美元符号来获得它:$A$5。粘贴或填充时,此单元格引用不会更改。

一个很酷但很少使用的功能是单个单元格引用中的行和列可以是独立的:$A5A$5。这对于从单个公式生成乘法表之类的东西非常有用。

There are two kinds of cell reference, and it's really valuable to understand them well.

One is relative reference, which is what you get when you just type the cell: A5. This reference will be adjusted when you paste or fill the formula into other cells.

The other is absolute reference, and you get this by adding dollar signs to the cell reference: $A$5. This cell reference will not change when pasted or filled.

A cool but rarely used feature is that row and column within a single cell reference may be independent: $A5 and A$5. This comes in handy for producing things like multiplication tables from a single formula.

樱桃奶球 2024-08-27 04:29:27

为了使公式更具可读性,您可以为单元格 A0 指定一个名称,然后在公式中使用该名称。

定义名称的最简单方法是突出显示单元格或区域,然后单击公式栏中的“名称”框。

然后,如果您将 A0 命名为“Rate”,您可以像这样使用该名称:

=(B0+4)/(Rate)

看,更容易阅读。

如果您想查找费率,请单击 F5,它将出现在“转到”列表中。

To make your formula more readable, you could assign a Name to cell A0, and then use that name in the formula.

The easiest way to define a Name is to highlight the cell or range, then click on the Name box in the formula bar.

Then, if you named A0 "Rate" you can use that name like this:

=(B0+4)/(Rate)

See, much easier to read.

If you want to find Rate, click F5 and it appears in the GoTo list.

过去的过去 2024-08-27 04:29:27

您将其设置为 =(B0+4)/($A$0)

您还可以使用 Sheet1!$a$0 浏览工作表

You put it as =(B0+4)/($A$0)

You can also go across WorkSheets with Sheet1!$a$0

我一直都在从未离去 2024-08-27 04:29:27
=(B0+4)/($A$0)

$ 表示保持相同(输入 A4 后按几次 F4 可快速翻阅组合!)

=(B0+4)/($A$0)

$ means keep same (press a few times F4 after typing A4 to flip through combos quick!)

风苍溪 2024-08-27 04:29:27

在行值前面放置一个 $ 以保持恒定对我来说效果很好。例如

=b2+a$1

Placing a $ in front of the row value to keep constant worked well for me. e.g.

=b2+a$1
青衫儰鉨ミ守葔 2024-08-27 04:29:27

是的。只需将 $ 符号放在所需的常数单元前面即可。

如果您只想连续更改数字 6 并保持不变,则类似于 $A6;如果您根本不希望该引用中的任何内容发生更改,则类似于 $A$6。

示例:单元格 A5 包含我的汇率。在 B1 中你输入 (= C1 * $A$1)。当您填充 B1 到 B 时......A5 中的值保持不变,而 C1 中的值连续增加。

我到目前为止还不太擅长老师,但我希望这会有所帮助!!!!眨眼

Yeah. Just put the $ sign in front of your desired constant cell.

Like $A6 if you wish to just change the number 6 serially and keep a constant, or $A$6 if you do not want anything from that reference to change at all.

Example: Cell A5 contains my exchange rate. In B1 you put say ( = C1 * $A$1). when you fill B1 through B....... the value in A5 remains constant and the value in C1 increases serially.

I am by far not be good at teacher, but I hope this helps!!!! Wink wink

寂寞美少年 2024-08-27 04:29:27

对于未来的访问者 - 使用此范围:($A$1:$A$10)

Example
=COUNTIF($G$6:$G$9;J6)>0

For future visitors - use this for range: ($A$1:$A$10)

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