+ Reply to Thread
Results 1 to 3 of 3

VBA_Cell to Return Value of INDEX and MATCH Array formula

  1. #1
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Question VBA_Cell to Return Value of INDEX and MATCH Array formula

    Dear all,
    I am dealing with Array formulas for the first time in VBA and tried hard to figure out how best i can use it, but failed.

    I have 2 sheets 'Previous' and 'Current' and below is the INDEX and MATCH array formula to return a value from 'Previous' sheet.
    When i update this formula is worksheet, it successfully return a value.
    Can any one help how can return same value using this Array formula in VBA...?

    Formula:
    Please Login or Register  to view this content.
    VBA code:
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    On way is, i can update the array formula directly into cell and re-paste only value into that cell.I know how to achieve this.
    But i want to know how to return only value in a cell by assigning a array formula in VBA.

    Thanks.
    Last edited by mchilapur; 03-18-2017 at 01:59 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: VBA_Cell to Return Value of INDEX and MATCH Array formula

    if you want in cel a value - use value, if you want to have there formula - use formulaarray
    but - in case of formulaarray you have to prepare string with real formula, so something like :
    Please Login or Register  to view this content.
    with .value use the same operations as you had in real formula so rather:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    09-20-2014
    Location
    India
    MS-Off Ver
    2013
    Posts
    275

    Re: VBA_Cell to Return Value of INDEX and MATCH Array formula

    Hello Kaper,thanks for your response.

    I used your below code to update value directly into by cell, but it throws 'Type Mismatch' Error.
    Any suggestions..?

    Please Login or Register  to view this content.
    May be because its not an array formula..? How do i make it an array formula..?

    I have used your below cel.FormulaArray and updated it will its own value as below. That covers my intent.
    But i more curious to know cel.value to update the value directly.


    Please Login or Register  to view this content.
    Last edited by mchilapur; 03-18-2017 at 02:26 AM.

+ 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. Replies: 2
    Last Post: 03-15-2017, 08:22 AM
  2. Replies: 3
    Last Post: 04-02-2016, 08:16 PM
  3. [SOLVED] Index/Match to Return 1D array to be used in a sumproduct
    By david0985 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-17-2014, 04:41 PM
  4. Replies: 4
    Last Post: 03-27-2014, 01:09 PM
  5. Use Index/Match Function to Return Values from an Array
    By 00pumpkin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2013, 02:22 PM
  6. Match/Index array in VBA to return cell address
    By djhsickboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2011, 02:18 AM
  7. Replies: 2
    Last Post: 02-27-2010, 11:17 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