Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Syntax advice

Assume a named range "my_rng"

One can say: Range("my_rng")(5)
One can say : [my_rng].cells(5)
One can say: Evaluate("my_rng")(5)
But one cannot say: [my_rng](5)

Why is that?

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Syntax advice

Because Excel doesn't parse out []( ) as anything meaningful would be my
guess.
Still, I don't know why you would use anything besides

Range("my_rng")(5)



--
Regards,
Tom Ogilvy


Terry von Gease wrote in message
...
Assume a named range "my_rng"

One can say: Range("my_rng")(5)
One can say : [my_rng].cells(5)
One can say: Evaluate("my_rng")(5)
But one cannot say: [my_rng](5)

Why is that?

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Syntax advice

From the On-line help I would have expected ["my_rng"](5) to work, but
it doesn't either.

Alan Beban

Tom Ogilvy wrote:
Because Excel doesn't parse out []( ) as anything meaningful would be my
guess.
Still, I don't know why you would use anything besides

Range("my_rng")(5)



--
Regards,
Tom Ogilvy


Terry von Gease wrote in message
...

Assume a named range "my_rng"

One can say: Range("my_rng")(5)
One can say : [my_rng].cells(5)
One can say: Evaluate("my_rng")(5)
But one cannot say: [my_rng](5)

Why is that?

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Syntax advice

Because I loathe typing and each keystroke increases the probability of
malfeasance.

But the curiosity here is that 'Evaluate("my_rng")(5)' works and, as per the
documentation, '[expression]' is a shortcut format for
'Evaluate("expression")', it would not be unreasonable to expect
'[my_rng](5)' to work as well.

Go figure....

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley

"Tom Ogilvy" wrote in message
...
Because Excel doesn't parse out []( ) as anything meaningful would be my
guess.
Still, I don't know why you would use anything besides

Range("my_rng")(5)



--
Regards,
Tom Ogilvy


Terry von Gease wrote in message
...
Assume a named range "my_rng"

One can say: Range("my_rng")(5)
One can say : [my_rng].cells(5)
One can say: Evaluate("my_rng")(5)
But one cannot say: [my_rng](5)

Why is that?

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Syntax advice

? ["my_rng"]
my_rng

It just evaluates the string constant "my_rng" to a string - doesn't see it
as a range name.

--
Regards,
Tom Ogilvy

Alan Beban wrote in message
...
From the On-line help I would have expected ["my_rng"](5) to work, but
it doesn't either.

Alan Beban

Tom Ogilvy wrote:
Because Excel doesn't parse out []( ) as anything meaningful would be

my
guess.
Still, I don't know why you would use anything besides

Range("my_rng")(5)



--
Regards,
Tom Ogilvy


Terry von Gease wrote in message
...

Assume a named range "my_rng"

One can say: Range("my_rng")(5)
One can say : [my_rng].cells(5)
One can say: Evaluate("my_rng")(5)
But one cannot say: [my_rng](5)

Why is that?

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Syntax advice

and then .. ([myRange])(1) DOES work again..
as the () around the[] force the name to be evaluated first


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Terry von Gease" wrote:

Assume a named range "my_rng"

One can say: Range("my_rng")(5)
One can say : [my_rng].cells(5)
One can say: Evaluate("my_rng")(5)
But one cannot say: [my_rng](5)

Why is that?

--
Terry

"I said I never had much use for one,
I never said I didn't know how to use one."
M. Quigley



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
pls advice dribler2 Excel Worksheet Functions 0 December 29th 06 02:22 PM
Need advice Form maker Excel Worksheet Functions 1 December 2nd 06 04:26 PM
Advice Please Greg B Excel Worksheet Functions 5 March 17th 05 12:13 PM
Almost got it !! but need advice Nospam Excel Worksheet Functions 6 February 28th 05 10:27 AM
Advice please Greg New Users to Excel 2 February 24th 05 12:19 PM


All times are GMT +1. The time now is 09:12 AM.

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"