COUNTA
hi,
I have the following:
Dim CountActual As Integer
Range("c7:c" & lastactioncode).select
MsgBox lastactioncode
'Range("Z1").Formula = "=COUNTA(C7:C4715)"
Range("Z1").Formula = "=COUNTA(C7:C) & lastactioncode"
CountActual = Range("Z1").Value
MsgBox CountActual
When I use the part that is commented out, I DO NOT get an error. However,
when I use the Range("Z1").Formula = "=COUNTA(C7:C) & lastactioncode"
part, I do not get an error, but "0" appears as the value for CountActual.
Then I look in the Z1 cell, and I se the formula is as follows:
=COUNTA($G:Z) & lastactioncode
How can I solve this?
Thanks in advance,
geebee
|