Results 1 to 4 of 4

Index Match, repeated numbers

Threaded View

  1. #1
    Registered User
    Join Date
    11-10-2008
    Location
    New York
    Posts
    4

    Index Match, repeated numbers

    I have the following code below and wanted to know how I can fix it.

    In
    Range ("A7: A186")
    are "rankings" and so there are some information in
    Range ("I7:I186")
    is equally ranked, namely 172 onwards

    When I perform an index/ match below, with the rankings numbers in Sheet 2, the repeated ranks do not populate. All I am getting is the first ranking result for the rank of 172, repeated until 186.

    Does anyone have any suggestions on how I can improve/ correct this error?
    ------

     
    Dim x As Range
    Dim x1 As Range
    Dim y As Worksheet
     
    Set x = Worksheets("sheet1").Range("A7:A186")
    Set x1 = Worksheets("sheet1").Range("I7:I186")
    Set y = Worksheets("sheet2")
     
    Dim i As Integer
     
    For i = 146 To 325
     
    y.Cells(i, 27).Value = Application.WorksheetFunction.Index(x1, Application.WorksheetFunction.Match(y.Cells(i, 26).Value, x, 0))
     
     
     
    Next i
     
    End Sub


    Thanks

    Tony
    Last edited by VBA Noob; 11-11-2008 at 05:09 PM. Reason: Added code tags as per forum rules

Thread Information

Users Browsing this Thread

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

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