Results 1 to 4 of 4

Index and Match - VBA - Issue

Threaded View

  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:
    ActiveCell.FormulaR1C1 = "=INDEX(Mapping!R2C3:R"" & lastrow_Age ""C3, MATCH(RC[-2]&RC[-1],INDEX(Mapping!R2C1:R"" & lastrow_Age & ""C1 & Mapping!R2C4:R"" & lastrow_Age & ""C4,0),0))"
    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

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