View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Counting a Region

=OFFSET(C3,0,0,ROWS(AssetTable),COLUMNS(AssetTable ))

--
__________________________________
HTH

Bob

"Paul D Byrne." wrote in message
...
Hi,

Is there a formula in excel, or a way to use existing formulas that can
count the number of rows and columns of region. I would like to enter this
into an Offset formula that I use in a range name. eg

Table starting at C3 and goes for x columns and y rows

RangeName = "AssetTable"

Formula is =OFFSET(C3,0,0,COUNTROWS(C3),COUNTCOLUMNS(C3))

I made up the COUNTROWS and COUNTCOLUMNS, so if I don't know how many rows
and how many columns the COUNTROWS will return the number from the cell
address C3.

I have used COUNTA many times before, however there may be other lines
adjacent to it so counting the whole row or column is not an option.

If I have to, I'll write a user defined function for it.

cheers,

Paul D Byrne.