+ Reply to Thread
Results 1 to 11 of 11

Explain Syntax [of INDEX with Evaluate]

  1. #1
    Forum Contributor
    Join Date
    03-17-2010
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    113

    Explain Syntax [of INDEX with Evaluate]

    hello
    Please Login or Register  to view this content.
    Last edited by alansidman; 10-29-2017 at 12:29 PM.

  2. #2
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Explain Syntax

    Hi Sohail

    This might be of some help.https://www.techonthenet.com/excel/f...x_function.php


    your line of code is evaluating half of the function.
    Teach me Excel VBA

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,659

    Re: Explain Syntax

    Index function will return an array, also extracts part of the array.

    When you need to extract part of array, the first argument must be 2d array and the 2nd argument must be a single d array,
    unless you extract one whole row or column.

    Evaluate method accepts 2d array so, Evaluate("row(1:" & lr & ")") will return
    1
    2
    3
    4
    .
    .
    lr

    so, it return array that is 1 to lr row with 1 & 2 columns.

  4. #4
    Forum Contributor
    Join Date
    03-17-2010
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: Explain Syntax

    but what mean array(1,2) and where is array?

  5. #5
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Explain Syntax [of INDEX with Evaluate]

    The VBA Array function just gives you a way to supply an "array" or group of values to other functions. Here it returns {1,2}.
    Your whole construction:
    Please Login or Register  to view this content.
    ...returns a subsection of the cells on Sheet1 defined as the intersection of rows 1 to lr with columns 1 to 2, = Range A1:Blr
    Last edited by leelnich; 10-29-2017 at 11:31 AM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,659

    Re: Explain Syntax

    Quote Originally Posted by sohaila View Post
    but what mean array(1,2) and where is array?
    Quote Originally Posted by jindon View Post
    so, it return array that is 1 to lr row with 1 & 2 columns.
    .................

  7. #7
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Explain Syntax [of INDEX with Evaluate]

    So, anybody, could this:
    Please Login or Register  to view this content.
    be re-written as:
    Please Login or Register  to view this content.
    ???
    Last edited by alansidman; 10-29-2017 at 12:30 PM.

  8. #8
    Forum Contributor
    Join Date
    03-17-2010
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: Explain Syntax [of INDEX with Evaluate]

    Thank you very much for all of you i really appreciate all of you
    once again thanks

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,019

    Re: Explain Syntax [of INDEX with Evaluate]

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  10. #10
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Explain Syntax [of INDEX with Evaluate]

    Quote Originally Posted by leelnich View Post
    So, anybody, could this:
    Please Login or Register  to view this content.
    be re-written as:
    Please Login or Register  to view this content.
    ???
    Yes, it could. The Evaluate is unnecessary for an operation as simple as that one!
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  11. #11
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Explain Syntax [of INDEX with Evaluate]

    Quote Originally Posted by sohaila View Post
    Thank you very much for all of you i really appreciate all of you
    once again thanks
    You're most welcome. If done with your thread, please go to Thread Tools (up top) and mark it as SOLVED. Thanks -Lee

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Evaluate syntax
    By kcaisaacs in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-30-2017, 05:57 AM
  2. [SOLVED] Please explain why I'm getting a syntax error?
    By Old4xford in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2015, 02:12 PM
  3. please explain the given syntax
    By roofi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-02-2015, 06:59 AM
  4. Syntax error using Evaluate
    By chiidzzz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2013, 05:04 PM
  5. Explain Syntax Error
    By captedgar in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-29-2010, 05:57 PM
  6. what should be syntax for evaluate Indirect
    By srinu1264 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2006, 09:30 AM
  7. [SOLVED] please explain this syntax
    By Papa Jonah in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2005, 04:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1