+ Reply to Thread
Results 1 to 3 of 3

misbehaving Vlookup function

  1. #1
    Registered User
    Join Date
    08-09-2010
    Location
    Midlands
    MS-Off Ver
    Excel 2010
    Posts
    38

    misbehaving Vlookup function

    Hi All,

    Strange problem today, I have been building some Vlookup functions and one has decided to not work so to investigate I built it bit by bit.

    The formula is =VLOOKUP('Sheet2'!$M$1, '[Workbook2.xlsx]Sheet3'!$A$383:$Y$383,Column('[Workbook2.xlsx]Sheet3'!$W$2,0)

    so it looks up a value from another sheet and finds it in column A of another workbook within a given range, then returns column W from that array. This formula works fine, however when I extend the array out to $A2:$Y$383 it suddenly loses the ability to find the correct data item.

    Does anyone have any ideas as to why this might be occuring? and no there are no duplicate entries in column A and all other elements seem to be working fine with the smaller range?

    Regards
    Maudise

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: misbehaving Vlookup function

    well this bit does nothing except increment the column looked up
    Column('[Workbook2.xlsx]Sheet3'!$W$2) it just = 23 and can be replaced with w1

    also there are other things wrong /missing
    i think it should probably look like this
    =VLOOKUP('Sheet2'!$M$1, '[Workbook2.xlsx]Sheet3'!$A$1:$Y$383,Column(w1),false)
    Last edited by martindwilson; 08-20-2010 at 10:20 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-09-2010
    Location
    Midlands
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: misbehaving Vlookup function

    Thanks, I appreciate that, however others have a habit of adding columns so I am hoping that it helps avoid the problem where adding a column throws out all the Vlookups! Not sure if it works yet though

    Maudise

+ Reply to Thread

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