Google表格范围

huangapple go评论108阅读模式
英文:

Google sheet ranges

问题

Is it possible to we can pass column ranges in numbers like rows

example basically if we want to count column A we write =COUNT(A:A)
I want to count column a by its column index =COUNT(1:1)

英文:

Is it possible to we can pass column ranges in numbers like rows

example basically if we want to count column A we write =COUNT(A:A)
I want to count column a by its column index =COUNT(1:1)

答案1

得分: 1

=COUNTA(OFFSET($A$1,0,B1-1):OFFSET($A$1,ROWS(A:A)-1,B1-1))

在这个示例中,假设你在B1中输入列号为4,它将计算D列中的6个元素。

英文:

Mmm, what you can do is to create some kind of OFFSET from A1. Let's say you input the column number in B1:

=COUNTA(OFFSET($A$1,0,B1-1):OFFSET($A$1,ROWS(A:A)-1,B1-1))

In this example, see as I've put input 4 and counts the 6 elements in column D:

Google表格范围

答案2

得分: 0

如果你的表格有A到Z列,你可以使用以下公式:

=count(index(A:Z,,1))

更一般的情况可以使用:

=COUNT(index(A1:indirect(address(rows(A:A),columns(1:1))),,1))

来计算第1列和第2列。

Google表格范围

英文:

If your sheet has columns A to Z, you can use

=count(index(A:Z,,1))

More generally

=COUNT(index(A1:indirect(address(rows(A:A),columns(1:1))),,1))

perhaps.

Google表格范围

to count column 1 then column 2.

huangapple
  • 本文由 发表于 2023年3月3日 23:11:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/75628785.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定