+ Reply to Thread
Results 1 to 6 of 6

why the error message?

  1. #1
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    why the error message?

    in this formula why comes the error message at the last col. till the last column it worked perfect. kindly explain.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-07-2011
    Location
    India, Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: why the error message?

    Error was giving because you had selected only 10 columns for vlookup and your column() formula was given 11 number so i have changed only column()-1 and that workes. Please check

    Regards,
    Suhas

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,380

    Re: why the error message?

    Because the range B:K only has 10 columns and you are in the 11th column (using COLUMN()).


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,380

    Re: why the error message?

    I agree with Suhas.

    And your formula isn't consistent. In some cases it only goes down to Row 20, not Row 21.

    Copy down and across: C8
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: why the error message?

    It shows a reference because you are telling it to use column() from column K which resolves to 11, but the table you are looking in starts at B and has only 10 columns till it gets to column K. So your vlookup formula is reading past the end of the vlookup table.

    If you look carefully you will see that all of your results are 1 column out, change the vlookup formula to be =VLOOKUP($B8,'Form-II'!$B$7:$K$20,COLUMN()-1,0), that should resolve your problems.
    Click * below if this answer helped

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,380

    Re: why the error message?

    @Chris 53: in fact, the table goes to row 21 so, if you copy that formula down it will fail on the last line.

    Regards, TMS

+ 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. An error message on open - a totally blank VBA message box
    By Mr_Tigas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-05-2013, 11:29 AM
  2. Error Message For Function Procedure WITHOUT using a message box
    By bmr8002 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2012, 02:01 PM
  3. Replacing run time error message with a different message
    By penny in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-14-2009, 10:51 AM
  4. [SOLVED] replace VBA run-time error message with custom message
    By BEEJAY in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-14-2006, 11:05 AM

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