简体   繁体   English

Google表格 - 插入行增量公式单元格

[英]Google Sheets - insert row increments formula cell

I've created a results page for a board game we play.我为我们玩的棋盘游戏创建了一个结果页面。 We enter the results on the Last Game sheet.我们在 Last Game 表格中输入结果。 I then click Save Results which inserts rows and copies the result data accordingly into three sheets, Game Totals, Player 1 and Player 2.然后单击“保存结果”,这会插入行并将结果数据相应地复制到三张表中,即游戏总数、玩家 1 和玩家 2。

The Last Game sheet has number of wins, averages and such which all use formulas, eg最后一场比赛表有获胜次数、平均数等,所有这些都使用公式,例如

=COUNTIF('Game Totals'!D2:D164, "SUSAN") =COUNTIF('游戏总数'!D2:D164, "苏珊")

D1 is a header row. D1 是标题行。 The latest results are copied into the inserted row, D2.最新的结果被复制到插入的行 D2 中。

My problem is while I want D164 to increment to D165 in the formula above I want D2 to remain as D2, but it increments to D3.我的问题是,虽然我希望 D164 在上面的公式中增加到 D165,但我希望 D2 保持为 D2,但它增加到 D3。

I read up a little on using $D$2 but that doesn't stop it from incrementing to D3.我阅读了一些关于使用 $D$2 的内容,但这并不能阻止它增加到 D3。

Any help most gratefully appreciated Cheers Johnny.任何帮助非常感谢干杯约翰尼。

假设单元格'Game Totals'!D1不等于Susan并且在插入行时不移动,您可以从该单元格开始范围引用:

=countif('Game Totals'!D1:D164, "SUSAN")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM