Excel 如何统计有文字的单元格

如题所述

1、首先,在excel表格中输入一些字符,并计算A1和B7之间的字符单元格数。


2、单击“fx”插入函数,并选择“=COUNTA”函数。

3、根据下图输入函数参数,或者直接输入公式:=COUNTA(A1:B7)。

4、单击“输入”以查看所选单元格区域中字符数为“7”的单元格。

温馨提示:答案为网友推荐,仅供参考
第1个回答  推荐于2017-11-23
可以利用公式
假设统计A1:C10区域内有文字的单元格
=counta(A1:C10)
假设文字不包含数字
可以使用
=counta(A1:C10)-Count(A1:C10)本回答被网友采纳
第2个回答  2020-01-22
public
sub
mxbing1984()
r
=
0
y
=
0
g
=
0
x
=
range("a65535").end(xlup).row
for
i
=
1
to
x
cells(i,
1).select
if
selection.font.colorindex
=
3
then

r
=
r
+
1
end
if
if
selection.font.colorindex
=
6
then

y
=
y
+
1
end
if
if
selection.font.colorindex
=
10
then

g
=
g
+
1
end
if
next
sheet2.cells.clear
sheet2.cells(1,
1).value
=
"红色"
sheet2.cells(1,
2).value
=
r
sheet2.cells(2,
1).value
=
"黄色"
sheet2.cells(2,
2).value
=
y
sheet2.cells(3,
1).value
=
"绿色"
sheet2.cells(3,
2).value
=
g
end
sub
统计a列字体的颜色,红色单元格个数r,黄色y,绿色g,结果将放在sheet2工作表
如果统计的是单元格的背景色,则把代码的font改成interior即可.
相似回答