+ Reply to Thread
Results 1 to 4 of 4

Index Match Help!

Hybrid View

  1. #1
    Registered User
    Join Date
    07-01-2015
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    66

    Exclamation Index Match Help!

    I'm trying to use Index Match formula instead of Vlookup due large amount of datas .
    Ive heard that its faster than using Vlookup formula .
    However , I encounter an error along this line .

    Range("S2").FormulaR1C1 = _
        "= INDEX([PatientMerge.xls]2015!C10,Match(C[-16],[PatientMerge.xls]2015!,C10,0))"

    I dont know what went wrong with my formula
    Please help
    Private Sub Unsuccessful()
    'Update Column S and T
    'S = Active Ext ID , T = Inactive Ext ID
    
    Dim MaxRowNum As Long
    
    With Application
            .ScreenUpdating = False
            .Calculation = xlManual
    End With
    
    Sheets("Simpat").Select
    
    'Find the max number of row
    MaxRowNum = 1
            
        Do While Cells(MaxRowNum, 2) <> "" Or Cells(MaxRowNum + 1, 2) <> ""
            MaxRowNum = MaxRowNum + 1
        Loop
    
    Range("S2").FormulaR1C1 = _
        "= INDEX([PatientMerge.xls]2015!C10,Match(C[-16],[PatientMerge.xls]2015!,C10,0))"
    
    With Application
            .ScreenUpdating = True
            .Calculation = xlCalculationAutomatic
    End With
    
    End Sub

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Index Match Help!

    not entirely sure what you are trying to do as formula does not make sense

    you have an extra comma in the the code for the formula
    "= INDEX([PatientMerge.xls]2015!C10,Match(C[-16],[PatientMerge.xls]2015!,C10,0))"
    then the issue is
    your formula outputs
    Formula: copy to clipboard
    =INDEX('[PatientMerge.xls]2015'!$J:$J,MATCH(C:C,'[PatientMerge.xls]2015'!$J:$J,0))


    which obviously does not work matching whole column C

    i suggest you go and use normal formula instead of R1C1 which you seem to be having issues understanding
    Range("S2").Formula = "=INDEX([PatientMerge.xls]2015!J:J,Match(C2,[PatientMerge.xls]2015!A:A,0))"
    replace A:A and/or J:J with what you do want in your formula
    Last edited by humdingaling; 07-12-2015 at 10:40 PM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Index Match Help!

    maybe use just .formula, not .formulaR1C1

  4. #4
    Registered User
    Join Date
    07-01-2015
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    66

    Re: Index Match Help!

    Thank you so much guys! Its working now.

+ 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. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  2. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  3. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  4. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  5. Replies: 5
    Last Post: 02-29-2012, 08:51 PM

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