Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default can we get the cell address from the name.

Hi,

I am pretty new to excel programming. I don't know if this is
possible.. I have defined a name like START_TABLE at the begining of a
table in excel and END_TABLE at the end as below.
---------------
| START_TABLE |
---------------
------------------------------------
|------- THE TABLE GOES HERE ---|
-------------------------------------
-----------------
| END_TABLE |
-----------------

This table can grow in number of rows. But I need to copy this table to
another worksheet. So I am trying to define a named cell like
START_TABLE at the start and END_TABLE at the end. Then trying to get
the address for the START_TABLE and the END_TABLE, then define a range
using those cell addresses. Is this a good approach? How can I get the
address for a named cell(is it START_TABLE.Address)?

Thanks
shi

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default can we get the cell address from the name.

Range(range("Start_Table"),range("End_Table")).Cop y


If you really want the address

s1 = Range("Start_Table").Address
s2 = Range("End_Table").Address


--
Regards,
Tom Ogilvy


"shishi" wrote in message
oups.com...
Hi,

I am pretty new to excel programming. I don't know if this is
possible.. I have defined a name like START_TABLE at the begining of a
table in excel and END_TABLE at the end as below.
---------------
| START_TABLE |
---------------
------------------------------------
|------- THE TABLE GOES HERE ---|
-------------------------------------
-----------------
| END_TABLE |
-----------------

This table can grow in number of rows. But I need to copy this table to
another worksheet. So I am trying to define a named cell like
START_TABLE at the start and END_TABLE at the end. Then trying to get
the address for the START_TABLE and the END_TABLE, then define a range
using those cell addresses. Is this a good approach? How can I get the
address for a named cell(is it START_TABLE.Address)?

Thanks
shi



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default can we get the cell address from the name.

hi,
I think you have a good idea but unfortunately excel doesn't think that way.
the entire table should be a named range. not just the start and stop point.
to select the table then is easy.

Range("NamedRAnge").select
msgbox Range("NamedRange").address

Is your table a solid block of data? does it start a Cell A1?
there are ways to resize the named range with code.

Regards
FSt1


"shishi" wrote:

Hi,

I am pretty new to excel programming. I don't know if this is
possible.. I have defined a name like START_TABLE at the begining of a
table in excel and END_TABLE at the end as below.
---------------
| START_TABLE |
---------------
------------------------------------
|------- THE TABLE GOES HERE ---|
-------------------------------------
-----------------
| END_TABLE |
-----------------

This table can grow in number of rows. But I need to copy this table to
another worksheet. So I am trying to define a named cell like
START_TABLE at the start and END_TABLE at the end. Then trying to get
the address for the START_TABLE and the END_TABLE, then define a range
using those cell addresses. Is this a good approach? How can I get the
address for a named cell(is it START_TABLE.Address)?

Thanks
shi


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default can we get the cell address from the name.

Hi FSt1 & Tom,

Thanks for your reply. I wish to ask you how can we use named range
to specify a number of rows when the number of rows change. The whole
idea is something like this.

I have an excel document with couple of lines of text and then a
table, then couple of lines of text and then table and so on. I wish to
specify a named range for the table. But I don't know how? Then I wish
to copy all the tables to another worksheet with a space between
tables. I wish to use the same program even when the number of rows in
the table increase or decrease. Since I don't know the excel
programming I find a lot of difficulty. Thanks a lot for your
suggestions.
shi

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default can we get the cell address from the name.

insert=Name=Define

Name: List2 for example of a name you could use
Refersto: =Offset(Sheet1!$a$1,0,0,CountA(sheet1!$A:$A),10)

as an example. Adjust 10 to reflect the number of columns.

--
Regards,
Tom Ogilvy

"shishi" wrote in message
ups.com...
Hi FSt1 & Tom,

Thanks for your reply. I wish to ask you how can we use named range
to specify a number of rows when the number of rows change. The whole
idea is something like this.

I have an excel document with couple of lines of text and then a
table, then couple of lines of text and then table and so on. I wish to
specify a named range for the table. But I don't know how? Then I wish
to copy all the tables to another worksheet with a space between
tables. I wish to use the same program even when the number of rows in
the table increase or decrease. Since I don't know the excel
programming I find a lot of difficulty. Thanks a lot for your
suggestions.
shi





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
=HYPERLINK("#"&CELL("address", ADDRESS(MATCH(VALUE(B3),QuoteNotes, sarah Excel Worksheet Functions 2 February 17th 09 02:59 PM
=HYPERLINK("#"&CELL("address", ADDRESS(MATCH(VALUE(B3),Range ... ? sarah Excel Worksheet Functions 0 February 17th 09 02:06 PM
Return cell address of a cell based on contents of cell. Danny Excel Worksheet Functions 4 November 15th 08 03:11 AM
find last cell in range with data, display cell address sevi61 Excel Worksheet Functions 14 October 29th 07 08:36 PM
store cell contents and cell address for comparsion & suming Jim Whelchel Excel Programming 1 November 24th 04 04:03 PM


All times are GMT +1. The time now is 04:13 AM.

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

About Us

"It's about Microsoft Excel"