Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Why does no one use the [A1] notation

Hello, why doesn't anyone use the [A1] notation? It seems easier to
write
[A1].select
than
Range("A1").select

so why do I never see it used, I'm guessing there must be a reason...

Thanks

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Why does no one use the [A1] notation

I (almost) always use that

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Michael" wrote in message
...
Hello, why doesn't anyone use the [A1] notation? It seems easier to
write
[A1].select
than
Range("A1").select

so why do I never see it used, I'm guessing there must be a reason...

Thanks

Michael


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 897
Default Why does no one use the [A1] notation

They probably learned it from the macro recorder.

Plus, you lose intellisense.

--JP

On Oct 15, 6:42*am, Michael wrote:
Hello, why doesn't anyone use the [A1] notation? It seems easier to
write
[A1].select
than
Range("A1").select

so why do I never see it used, I'm guessing there must be a reason...

Thanks

Michael

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Why does no one use the [A1] notation

Hi Michael,

Hello, why doesn't anyone use the [A1] notation? It seems easier to
write
[A1].select
than
Range("A1").select


One reason might be that the piece between brackets has to be interpreted
(evaluated) by the compiler before it can be "used". So it is slower.

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Why does no one use the [A1] notation

1. Fully "qualifying" rather than "evaluating" saves a lot of work behind
the scenes, ie faster.

2. With Range(sAddress) no need to hardcode

3. You get all the intellisense after typing Range("a1") dot

In the following Range() vs [A1] loops 2.5 x faster for me -

Sub test()
Dim t As Single, i As Long, d As Double
[A1] = 123

For k = 1 To 3
t = Timer
For i = 1 To 100000
If k = 1 Then
x = [A1].Value
ElseIf k = 2 Then
x = [=A1]
Else
x = Range("A1").Value
End If
Next
Debug.Print Timer - t
Next

End Sub

For quickly trying things out I use [A1], but never in completed code.

Regards,
Peter T

"Michael" wrote in message
...
Hello, why doesn't anyone use the [A1] notation? It seems easier to
write
[A1].select
than
Range("A1").select

so why do I never see it used, I'm guessing there must be a reason...

Thanks

Michael



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
what is a scientific notation#? hisham Excel Discussion (Misc queries) 4 February 16th 10 06:34 PM
R1C1 Notation??? Clueless Excel Programming 1 September 16th 09 06:34 PM
Set Notation in Excel mj[_2_] Excel Discussion (Misc queries) 5 November 26th 07 10:55 AM
Scientific notation Biocellguy Excel Worksheet Functions 2 May 24th 07 07:48 PM
R1C1 Notation in VBA Fred Holmes Excel Programming 1 October 21st 05 09:33 PM


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