+ Reply to Thread
Results 1 to 4 of 4

Index and Match - VBA - Issue

  1. #1
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Index and Match - VBA - Issue

    Dear all,

    I'm facing an issue in implementing Index and Match using VBA.

    PFA for 2 files:
    Index and Match.xlsx -> Successfully implemented Index and Match using Formula.
    Index and Match.xlsm-> To implement Index and Match using VBA

    Input sheet: Mapping
    Output sheet: To Map

    In " Mapping " sheet, Columns A through D has ID, Name, Age and Year.

    In " To Map" sheet, Columns A and B has ID and Year respectively.

    I need to map the correct Age for the give ID and Year using VBA.

    = Input =
    ID Name Age Year
    1 A 12 2012
    1 A 13 2013
    2 B 12 2012
    2 B 13 2013

    = Expected Output =
    ID Year Age
    1 2012 12
    2 2013 13

    Formula is at Cell C2.

    Request you to debug Mapping() in Index and Match.xlsm

    Code causing error:
    Please Login or Register  to view this content.
    Request you to help me correct/implement the same using VBA.

    P.S: Data is always of dynamic range.

    Thanks,
    Vinod Krishna
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Index and Match - VBA - Issue

    Vinod

    You don't need the "".
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    06-05-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2016
    Posts
    110

    Re: Index and Match - VBA - Issue

    Thank you so much Norie.

    I thought we need to use one-extra " before " as an Escape character.

    But then it wasn't required.

    Problem Solved

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Index and Match - VBA - Issue

    You only need to 'double' up quotes if the formula contains a text string.

    For example, to put this formula in B1,
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    the code would look like this.
    Please Login or Register  to view this content.
    Last edited by Norie; 02-26-2014 at 08:00 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. [SOLVED] Index/Match Issue
    By rolo_celticfc in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 10-14-2013, 09:26 AM
  2. Index-Match Issue (I Think)
    By rormis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-24-2012, 05:43 AM
  3. index match issue
    By jw01 in forum Excel General
    Replies: 1
    Last Post: 07-13-2012, 11:02 PM
  4. index..match - issue
    By step_one in forum Excel General
    Replies: 15
    Last Post: 05-03-2011, 08:25 AM
  5. Match index issue?
    By Mparekh in forum Excel General
    Replies: 12
    Last Post: 03-17-2009, 09:56 AM

Tags for this Thread

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