CountA formila for a varying range

S

Simon

Sub Count()

Dim Work As Workbook
Dim Figures As Workbook

Set Work = Workbooks.Open("N:Work.csv")
Set Figures = Workbooks.Open("N:\Figures June.xls")

Work.Activate
Range("A1").Select
RngA = Range(Selection, Selection.End(xlDown)).Select
Figures.Activate

ActiveCell.FormulaR1C1 = "=COUNTA(DALWork!R1C1:RngA)"
'ActiveRange = "=COUNTA(Selection)"

'RngA states True

End Sub

What should I put in the formula instead of RngA?
 
B

Bob Phillips

How about

ActiveCell.Formula = "=COUNTA(" & RngA.Address(,,,True) & ")"


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Top