Counting formulas referring to a range containing formulas

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Countblank will count "" as blank, CountA will not. That's all I can think of since:


Excel 2010
ABCDEF
1
2thethe1book1
3my
4mine
5your
6aa1library5
7aa2pen6
8anan1apple7
9Germany
10England
11thethe2librarian10
12thethe3forest11
13anan2uncle1233
1415
Sheet16
Cell Formulas
RangeFormula
F13=COUNTA(A2:D13)
F14=COUNTBLANK(A2:D13)
 
Last edited:
Upvote 0
Sure, please. Many thanks for your time, in advance.

Formulas in B columnFormulas in D columnaanthe
thethe1book1=A2&IF(A2="", "", COUNTIF($A$2:A2, A2))=IF(B2="", "", COUNTA($B$2:B2))1libraryapplebookFormulas in L column
my=A3&IF(A3="", "", COUNTIF($A$2:A3, A3))2penunclelibrarian=counta(B2:B13)12
mine=A4&IF(A4="", "", COUNTIF($A$2:A4, A4))3#N/A#N/Aforest=count(D2:D13)7
your=A5&IF(A5="", "", COUNTIF($A$2:A5, A5))4#N/A#N/A#N/A=COUNTBLANK(D2:D13)5
aa1library55#N/A#N/A#N/A=countif(B2:B13, "*")12
aa2pen66#N/A#N/A#N/A=countif(D2:D13, "*")5
anan1apple77#N/A#N/A#N/A=rows(A2:D13)*columns(A2:D13)48
Germany8#N/A#N/A#N/A=counta(A2:D13)+countblank(A2:D13)58
England9#N/A#N/A#N/A
thethe2librarian1010#N/A#N/A#N/A
thethe3forest1111#N/A#N/A#N/A
anan2uncle12

<colgroup><col style="width: 60px"><col width="60"><col width="60"><col width="60"><col width="268"><col width="198"><col width="60"><col width="60"><col width="60"><col width="60"><col width="228"><col width="60"></colgroup><tbody>
</tbody>
 
Upvote 0
Formulas in B columnFormulas in C column aanthe
thethe1book1=A2&IF(A2=""; ""; COUNTIF($A$2:A2; A2))=IF(B2=""; ""; COUNTA($B$2:B2))1libraryapplebooktotal cells48=COLUMNS(A2:D13)*ROWS(A2:D13)
my =A3&IF(A3=""; ""; COUNTIF($A$2:A3; A3))=IF(B3=""; ""; COUNTA($B$2:B3))2penunclelibrariantotal cells58=COUNTA(A2:D13)+COUNTBLANK(A2:D13)
mine =A4&IF(A4=""; ""; COUNTIF($A$2:A4; A4))=IF(B4=""; ""; COUNTA($B$2:B4))3#N/A#N/AforestNon-text values12=COUNTIF(A2:D13; "<>*")
your =A5&IF(A5=""; ""; COUNTIF($A$2:A5; A5))4#N/A#N/A#N/ANon-blank values in formula12=COUNTA(B2:B13)
aa1library5=A6&IF(A6=""; ""; COUNTIF($A$2:A6; A6))5#N/A#N/A#N/ABlank cells in formula5=COUNTBLANK(B2:B13)
aa2pen6=A7&IF(A7=""; ""; COUNTIF($A$2:A7; A7))6#N/A#N/A#N/ANumeric values7=COUNT(A2:D13)
anan1apple7=A8&IF(A8=""; ""; COUNTIF($A$2:A8; A8))7#N/A#N/A#N/ANon-text values12{=SUM(IF(ISNONTEXT(A2:D13);1))}
Germany 8#N/A#N/A#N/AText values36{=SUM(IF(ISTEXT(A2:D13);1))}
England 9#N/A#N/A#N/AText values36=COUNTIF(A2:D13; "*")
thethe2librarian1010#N/A#N/A#N/AN/A value26=COUNTIF(H1:J12; "#N/A")
thethe3forest1111#N/A#N/A#N/A
anan2uncle12

<colgroup><col span="4"><col><col><col span="4"><col><col span="4"></colgroup><tbody>
</tbody>
 
Upvote 0
If you're trying to exclude "" and true blanks from your count:


Excel 2010
ABCDEF
2thethe1book1
3  my
4  mine
5  your
6aa1library5
7aa2pen6
8anan1apple7
9  Germany
10  England
11thethe2librarian10
12thethe3forest11
13anan2uncle1233
1415
Sheet16
Cell Formulas
RangeFormula
A3=""
A4=""
A5=""
A9=""
A10=""
B3=""
B4=""
B5=""
B9=""
B10=""
F13=SUMPRODUCT(--(LEN(A2:D13)<>0))
F14=SUMPRODUCT(--(LEN(A2:D13)=0))


is another way
 
Upvote 0
If you're trying to exclude "" and true blanks from your count:

[...]

F13=SUMPRODUCT(--(LEN(A2:D13)<>0))
F14=SUMPRODUCT(--(LEN(A2:D13)=0))

<tbody>
</tbody>

is another way

=COUNTIFS(A2:D13,"?*")

=COUNTIFS(A2:D13,"")

would be tad faster in this type of text situations.
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,042
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top