Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default reading cells by name/definition

Hello all,
just wish to know is it possible to read excel cells by their name
instead of cell reference.

i.e. instead of using xlsheet.range(A4).value, can i use
xlsheet.range("my_given_name").value
where A4 is named as my_given_name ?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default reading cells by name/definition

Did you try it? If you did you would answer your own question.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Hello all,
just wish to know is it possible to read excel cells by their name
instead of cell reference.

i.e. instead of using xlsheet.range(A4).value, can i use
xlsheet.range("my_given_name").value
where A4 is named as my_given_name ?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default reading cells by name/definition

i tried it and it generated an exception citing problems with
"getrange" method

just wish to know is it possible to access a cell content by its name?

Bob Phillips wrote:

Did you try it? If you did you would answer your own question.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Hello all,
just wish to know is it possible to read excel cells by their name
instead of cell reference.

i.e. instead of using xlsheet.range(A4).value, can i use
xlsheet.range("my_given_name").value
where A4 is named as my_given_name ?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default reading cells by name/definition

Which you didn't mention in your post.

It works, it must be your code somewhere.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
i tried it and it generated an exception citing problems with
"getrange" method

just wish to know is it possible to access a cell content by its name?

Bob Phillips wrote:

Did you try it? If you did you would answer your own question.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Hello all,
just wish to know is it possible to read excel cells by their name
instead of cell reference.

i.e. instead of using xlsheet.range(A4).value, can i use
xlsheet.range("my_given_name").value
where A4 is named as my_given_name ?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default reading cells by name/definition

thanks for the reply bob. but for some reason it is not working
exception thrown refers to this method
excel.worksheet.getrange(object cell1, object cell2)

I am passing the cell name as string to the range method

Bob Phillips wrote:

Which you didn't mention in your post.

It works, it must be your code somewhere.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
i tried it and it generated an exception citing problems with
"getrange" method

just wish to know is it possible to access a cell content by its name?

Bob Phillips wrote:

Did you try it? If you did you would answer your own question.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Hello all,
just wish to know is it possible to read excel cells by their name
instead of cell reference.

i.e. instead of using xlsheet.range(A4).value, can i use
xlsheet.range("my_given_name").value
where A4 is named as my_given_name ?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default reading cells by name/definition

I think you will need to post more code if you want a solution mate, we are
working blind.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
thanks for the reply bob. but for some reason it is not working
exception thrown refers to this method
excel.worksheet.getrange(object cell1, object cell2)

I am passing the cell name as string to the range method

Bob Phillips wrote:

Which you didn't mention in your post.

It works, it must be your code somewhere.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
i tried it and it generated an exception citing problems with
"getrange" method

just wish to know is it possible to access a cell content by its name?

Bob Phillips wrote:

Did you try it? If you did you would answer your own question.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Hello all,
just wish to know is it possible to read excel cells by their name
instead of cell reference.

i.e. instead of using xlsheet.range(A4).value, can i use
xlsheet.range("my_given_name").value
where A4 is named as my_given_name ?





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default reading cells by name/definition

Here is an example demonstrating that it does work

Range("A1").Value = 99
Range("A1").Name = "my_named_range"
MsgBox Range("my_named_range").Value


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
thanks for the reply bob. but for some reason it is not working
exception thrown refers to this method
excel.worksheet.getrange(object cell1, object cell2)

I am passing the cell name as string to the range method

Bob Phillips wrote:

Which you didn't mention in your post.

It works, it must be your code somewhere.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
i tried it and it generated an exception citing problems with
"getrange" method

just wish to know is it possible to access a cell content by its name?

Bob Phillips wrote:

Did you try it? If you did you would answer your own question.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
oups.com...
Hello all,
just wish to know is it possible to read excel cells by their name
instead of cell reference.

i.e. instead of using xlsheet.range(A4).value, can i use
xlsheet.range("my_given_name").value
where A4 is named as my_given_name ?





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
Reading Cells from One Worksheet in another Mike Setting up and Configuration of Excel 2 July 19th 07 08:26 PM
Reading Cells In another worksheet mike Excel Discussion (Misc queries) 1 June 7th 07 03:09 PM
Reading Cells is the same workbook different tab Mike Excel Discussion (Misc queries) 1 June 7th 07 03:08 PM
Using Cells( ) for Range definition [email protected] Excel Programming 5 September 2nd 03 08:04 PM
reading cells from a spreadsheet using VB Bob Kilmer Excel Programming 0 August 1st 03 01:37 PM


All times are GMT +1. The time now is 11:36 PM.

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"