Hi all,
I want to create a function which counts all numbers in a column in all sheets.
I already found a function which returns all sheets names, so I have a tab which shows what sheets I have which can be found below:
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 64, align: center"]Tab names: [/TD]
[/TR]
[TR]
[TD="class: xl64, align: center"]18 Apr[/TD]
[/TR]
[TR]
[TD="class: xl64, align: center"]10 Apr[/TD]
[/TR]
[TR]
[TD="class: xl64, align: center"]etc.... [/TD]
[/TR]
</tbody>[/TABLE]
Then I got in my main sheet:
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Letter: [/TD]
[TD="class: xl67, width: 64"]Appearances:[/TD]
[/TR]
[TR]
[TD="class: xl67"]A[/TD]
[TD="class: xl67, align: right"]25[/TD]
[/TR]
[TR]
[TD="class: xl67"]B[/TD]
[TD="class: xl67, align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl67"]C[/TD]
[TD="class: xl67, align: right"]8[/TD]
[/TR]
[TR]
[TD="class: xl67"]D[/TD]
[TD="class: xl67, align: right"]57[/TD]
[/TR]
[TR]
[TD="class: xl67"]E[/TD]
[TD="class: xl67, align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
And I counted the appearances with the formula:
=SUMPRODUCT(COUNTIF(INDIRECT("'"&Tabs!$A$2:$A$41&"'!A:A"), A3))
But the thing is that in my sheets, I am hiding a lot of rows because they have to be excluded.
The formula that I use counts even the values which are filtered out and I would like to only count the visible cells.
I found some formulas about how to only count the visible cells, but I don't know how to combine them.
So what I want to see is a table which is for example like:
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width: 48pt;"></colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Letter: [/TD]
[TD="class: xl67, width: 64"]Appearances:[/TD]
[/TR]
[TR]
[TD="class: xl67"]A[/TD]
[TD="class: xl67, align: right"]5[/TD]
[/TR]
[TR]
[TD="class: xl67"]B[/TD]
[TD="class: xl67, align: right"]8[/TD]
[/TR]
[TR]
[TD="class: xl67"]C[/TD]
[TD="class: xl67, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl67"]D[/TD]
[TD="class: xl67, align: right"]50[/TD]
[/TR]
[TR]
[TD="class: xl67"]E[/TD]
[TD="class: xl67, align: right"]0
[/TD]
[/TR]
</tbody>[/TABLE]
which is almost the same, but you can see that it contains lower appearances since only the visible cells are counted.
Hope you can help me,
Laurens
I want to create a function which counts all numbers in a column in all sheets.
I already found a function which returns all sheets names, so I have a tab which shows what sheets I have which can be found below:
[TABLE="width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 64, align: center"]Tab names: [/TD]
[/TR]
[TR]
[TD="class: xl64, align: center"]18 Apr[/TD]
[/TR]
[TR]
[TD="class: xl64, align: center"]10 Apr[/TD]
[/TR]
[TR]
[TD="class: xl64, align: center"]etc.... [/TD]
[/TR]
</tbody>[/TABLE]
Then I got in my main sheet:
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Letter: [/TD]
[TD="class: xl67, width: 64"]Appearances:[/TD]
[/TR]
[TR]
[TD="class: xl67"]A[/TD]
[TD="class: xl67, align: right"]25[/TD]
[/TR]
[TR]
[TD="class: xl67"]B[/TD]
[TD="class: xl67, align: right"]10[/TD]
[/TR]
[TR]
[TD="class: xl67"]C[/TD]
[TD="class: xl67, align: right"]8[/TD]
[/TR]
[TR]
[TD="class: xl67"]D[/TD]
[TD="class: xl67, align: right"]57[/TD]
[/TR]
[TR]
[TD="class: xl67"]E[/TD]
[TD="class: xl67, align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
And I counted the appearances with the formula:
=SUMPRODUCT(COUNTIF(INDIRECT("'"&Tabs!$A$2:$A$41&"'!A:A"), A3))
But the thing is that in my sheets, I am hiding a lot of rows because they have to be excluded.
The formula that I use counts even the values which are filtered out and I would like to only count the visible cells.
I found some formulas about how to only count the visible cells, but I don't know how to combine them.
So what I want to see is a table which is for example like:
[TABLE="width: 128"]
<colgroup><col width="64" span="2" style="width: 48pt;"></colgroup><tbody>[TR]
[TD="class: xl66, width: 64"]Letter: [/TD]
[TD="class: xl67, width: 64"]Appearances:[/TD]
[/TR]
[TR]
[TD="class: xl67"]A[/TD]
[TD="class: xl67, align: right"]5[/TD]
[/TR]
[TR]
[TD="class: xl67"]B[/TD]
[TD="class: xl67, align: right"]8[/TD]
[/TR]
[TR]
[TD="class: xl67"]C[/TD]
[TD="class: xl67, align: right"]3[/TD]
[/TR]
[TR]
[TD="class: xl67"]D[/TD]
[TD="class: xl67, align: right"]50[/TD]
[/TR]
[TR]
[TD="class: xl67"]E[/TD]
[TD="class: xl67, align: right"]0
[/TD]
[/TR]
</tbody>[/TABLE]
which is almost the same, but you can see that it contains lower appearances since only the visible cells are counted.
Hope you can help me,
Laurens