Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a column which store variables, I need to know how many variables in
the column with VBA, however, I cannot get it. column A John .. Jason .. Eric ... I tried the following commands: '''''''''''''''''''''''''''''''''''''''''''''''''' Dim a As Integer a="=COUNTA(A:A)" For ii=1 to a .. .. .. Next ii .. .. .. ''''''''''''''''''''''''''''''''''''''''''''''''' The return of a is always 1, can anyone help me?I just begin to learn VBA. Thanks! Wei |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try a=worksheetfunction.CountA("A:A")
Wei wrote: I have a column which store variables, I need to know how many variables in the column with VBA, however, I cannot get it. column A John . Jason . Eric .. I tried the following commands: '''''''''''''''''''''''''''''''''''''''''''''''''' Dim a As Integer a="=COUNTA(A:A)" For ii=1 to a . . . Next ii . . . ''''''''''''''''''''''''''''''''''''''''''''''''' The return of a is always 1, can anyone help me?I just begin to learn VBA. Thanks! Wei |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I just figured it out
a=Application.CountA(Range("A:A")) Thanks! Wei "JW" wrote in message oups.com... Try a=worksheetfunction.CountA("A:A") Wei wrote: I have a column which store variables, I need to know how many variables in the column with VBA, however, I cannot get it. column A John . Jason . Eric .. I tried the following commands: '''''''''''''''''''''''''''''''''''''''''''''''''' Dim a As Integer a="=COUNTA(A:A)" For ii=1 to a . . . Next ii . . . ''''''''''''''''''''''''''''''''''''''''''''''''' The return of a is always 1, can anyone help me?I just begin to learn VBA. Thanks! Wei |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
dynamic range counta error | Excel Programming | |||
dynamic range counta error | Excel Programming | |||
COUNTA function causing syntax error in macro... | Excel Worksheet Functions | |||
WorksheetFunction.CountA - Excel 2000, Please help | Excel Programming | |||
COUNTA Function not working =COUNTA(C3:C69,"NH") | Excel Worksheet Functions |