Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8951723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:43:47+00:00 2026-06-15T13:43:47+00:00

http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.worksheet.get_range.aspx it says to use the Range property instead of get_Range(Object Cell1, Object Cell2).

  • 0

http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.worksheet.get_range.aspx it says to use the Range property instead of get_Range(Object Cell1, Object Cell2).

They are both doing the same thing, Gets a Microsoft.Office.Interop.Excel.Range object that represents a cell or a range of cells. So, what’s the difference except that this is a method and another is a property? Why are they pointing on use of Range[], what’s the reason for it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:43:49+00:00Added an answer on June 15, 2026 at 1:43 pm

    Range() is faster than Range[]

    By practice we have noticed it the case. But here should define a reason to say so.

    This shortcut is convenient when you want to refer to an absolute range. However, it is not as flexible as the Rangeproperty as it cannot handle variable input as strings or object references. So at the end of the day you will still end up referring the long way. Although the shorty provides readability. Hence might as well get it right the first round without more resources spending.

    Now why is it slow? In the compiling.

    “During run-time Excel always uses conventional notation (or so I’ve been told), so when the code is being compiled all references in shortcut notation must be converted to conventional range form (or so I’ve been told). {ie [A150] must be converted to Range(“A150”) form}. Whatever the truth of what I’ve been told, Visual Basic has to memorize both its compiled version of the code and whatever notation you used to write your code (i.e. whatever’s in the code module), the workbook properties for the file size (the memory used) thus goes up slightly. “

    As you see my answer was more in line with VBA. However after some research it is sort of proved that VBA side doesn’t do much slowing down. So you only need to take care of the C# side. @Hans gives you a better answer in C# perspective. Hope combining both that you will get a great performing code 🙂

    Here is some finding on the performance of Range[] vs Range() in Excel

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got below code from http://msdn.microsoft.com/en-us/library/dd584174(office.11).aspx for adding custom property in webpart tool pane.
Following the article at http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx I tried to setup development environment for SharePoint 2010
I read the msdn article about disposing objects in http://msdn.microsoft.com/en-us/library/ee557362(office.14).aspx now I'm really confused
http://msdn.microsoft.com/en-us/library/system.object.gethashcode(VS.80).aspx says: For the best performance, a hash function must generate a random distribution
http://msdn.microsoft.com/en-us/library/system.windows.controls.listboxitem.aspx Says ListBoxItem is in System.Windows.Controls. Where is that namespace? The using Windows.System.Controls; statement
I've a table in powerpoint document (table type: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.powerpoint.table.aspx ) What i want to
http://msdn.microsoft.com/en-us/library/ms731379.aspx says value of maxConcurrentSessions is by default 10 where as http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicethrottlingbehavior.maxconcurrentsessions.aspx says its
http://msdn.microsoft.com/en-us/library/ms190346.aspx It says here in the section under the statement start/end offset that you
http://msdn.microsoft.com/en-us/library/system.double.epsilon.aspx If you create a custom algorithm that determines whether two floating-point numbers can
http://msdn.microsoft.com/en-us/library/ms189797.aspx In this link they are committing a transaction within catch clause IF (XACT_STATE())

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.