计算vba中连续的条目 [英] count the entries in a row in vba

查看:90
本文介绍了计算vba中连续的条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个简单的问题,我认为这是一个简单的解决方案:D



但看起来我觉得愚蠢得到它:



我在Excel中有一行带有一些条目

It's a simple question with an easy solution I think :D

But it looks like i'm to stupid to get it:

I have a row in Excel with some entries

  A      B      C       D       ...
3 entry1 entry2 entry3  entry4  ...
4 entry4 entry5 entry6  entry7  ...
5 entry8 entry9 entry10 entry11 ...
.                         .
.                         .
.                         .



我需要计算第3行中的所有被告和结果。

我对第4行做同样的事情等等


Well I need to count all entrys in line 3 and the result.
After I do the same with line 4 and so on

推荐答案

你的意思是你想要显示行中已填充的单元格数量吗?



如果在这种情况下,尝试类似

Do yu mean you would like to show the amount of filled cells within the row?

If that is the case, try something like
rownum = Range("A3").Row
test = Application.Evaluate("COUNTA(" & rownum & ":" & rownum & ")")
MsgBox test


这篇关于计算vba中连续的条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆