Dear all,
In my VBA code, I need to put a variable... The value of this variable
is the number of columns that there are values. For example:
A B C D E F G H ...
1 1 1 1 1
In this case the variable must be 5
Other Example
A B C D E F G H ...
1 1 1 1 1 1 1 1
In this case the variable must be 8
Thanks a lot!
André.
Dave Peterson - 12 Aug 2007 13:46 GMT
If the values are numeric:
Dim myCount as Long
mycount = application.count(worksheets("sheet9999").rows(2))
if the values are alphanumeric, use application.counta()
Remember that all formulas (including formulas that return "") will be counted
in .counta().
> Dear all,
>
[quoted text clipped - 16 lines]
>
> André.

Signature
Dave Peterson
gatarossi@ig.com.br - 12 Aug 2007 14:06 GMT
Dear Dave
Perfect!
Thanks a lot!!!
André.