Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default CountA formila for a varying range

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default CountA formila for a varying range

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)

"Simon" wrote in message
...
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programatically Extend The Formila In A Cell Steve[_91_] Excel Programming 3 September 8th 07 01:42 PM
dynamic range counta error Bob Phillips Excel Programming 0 August 20th 07 12:18 PM
Using Counta with a range Michael Whitney Excel Programming 4 October 16th 06 11:01 PM
AutoFill down a varying Range Dean@ERYC Excel Programming 3 October 13th 06 03:56 PM
Range varying in for loop McManCSU Excel Programming 1 June 16th 05 06:24 PM


All times are GMT +1. The time now is 04:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"