+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP Not Referencing Correct Row When Rows are Sorted

  1. #1
    Registered User
    Join Date
    04-21-2017
    Location
    United States
    MS-Off Ver
    Excel
    Posts
    35

    VLOOKUP Not Referencing Correct Row When Rows are Sorted

    Hello all,

    I have a large table and I'm trying to sort data. Everything is sorted correctly, but my first column (VLOOKUP formula) isn't referencing the correct row when another column is sorted from largest to smallest.

    For example:

    My first cell has the formula =VLOOKUP(K1, $R$1:$W$1050$, 3, false).... when I sort the data, the vlookups are picking up the original location of the data rather than the new sorted location (So for the data in the first row, it goes from first to very low on the list, but it's pulling from the original location rather than the new location)...

    Without locking in every single row manually with "$," how can I make sure the formula stays with the correct data? Thanks

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP Not Referencing Correct Row When Rows are Sorted

    Try

    =VLOOKUP('Sheet Name'!K1, $R$1:$W$1050$, 3, false)

    Where Sheet Name is the name of the sheet K1 resides on.

  3. #3
    Registered User
    Join Date
    04-21-2017
    Location
    United States
    MS-Off Ver
    Excel
    Posts
    35

    Re: VLOOKUP Not Referencing Correct Row When Rows are Sorted

    The actual formula I have is the following:

    =vlookup('All Players'!K8,Other!$C$3:$I$6956,7,false)


    So I guess that solution isn't needed since the sheet name is in the formula. Sorry, I should have specified this earlier. I'm just completely stumped on this.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: VLOOKUP Not Referencing Correct Row When Rows are Sorted

    Do you mean the lookup_value 'All Players'!K8 in column K is sorted and move to other position, for example, K1?

    Assuming the value of K8 is 100, try to type that value in the formula: = VLOOKUP(100,...)
    Quang PT

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP Not Referencing Correct Row When Rows are Sorted

    ok, WHICH data is being sorted, on All Players, or on Other ?

    Can you post a sample workbook with Before and After examples ?

+ 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] Formula not referencing the correct row after sorting
    By MnMCarta in forum Excel General
    Replies: 2
    Last Post: 10-02-2015, 01:49 PM
  2. Listbox needs referencing to correct Worksheet
    By burger160 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2014, 07:42 AM
  3. Replies: 5
    Last Post: 07-05-2013, 03:01 AM
  4. Replies: 3
    Last Post: 10-25-2012, 03:34 AM
  5. Referencing the correct object in a formula
    By capnhud in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2010, 06:03 PM
  6. Correct naming of sorted data
    By mark_varney47 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-08-2007, 09:07 AM
  7. [SOLVED] Referencing to cells in a sorted list
    By tbobster in forum Excel General
    Replies: 2
    Last Post: 05-08-2006, 02:45 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