Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Counting a Region

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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Counting a Region

Thanks for the reply Bob, however I get a "reference not valid" when I enter
this into the range name. Maybe I should elaborate further.

On a sheet in a new workbook I have 4 Columns, Cateogry, SubType,AssetClass
and Name Addition (there maybe more columns later) and a number of rows.

I want to create a Named Range, AssetClass that returns the reference for
the current region of that table. Usually I would add the formula below to
the range name.

=OFFSET(Sheet1!$C$3,0,0,COUNTA(Sheet1!$C:$C),COUNT A(Sheet1!$3:$3))

which would allow me to add as many rows and column as I like - as long as
there is no other data on row 3 or column c. this is the problem. Because the
range is AssetTable the command ROWS(AssetTable) is calling itself which
isn't working.


"Bob Phillips" wrote:

=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.




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
VBA determine computer region Viperv10 Setting up and Configuration of Excel 5 May 27th 07 01:39 AM
Region Zaahir Excel Discussion (Misc queries) 2 November 14th 06 02:22 PM
need to zoom in a particular region of graph Shrikar Charts and Charting in Excel 0 June 20th 06 04:30 PM
Is it possible to count if within a number region? themax16 Excel Discussion (Misc queries) 3 May 22nd 05 06:46 PM
how to shrink a region (because of a maverick) Vollkorntoast Charts and Charting in Excel 1 March 10th 05 02:03 PM


All times are GMT +1. The time now is 07:47 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"