COUNTA

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top