+ Reply to Thread
Results 1 to 4 of 4

Index formula instead of VLookup

Hybrid View

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    4

    Post Index formula instead of VLookup

    Dear All,

    The vlookup formula slows down my PC . Is there any index formula for instead of below mentioned.

    =IF(ISNA((VLOOKUP(A6,DATA!C:E,2,FALSE))+((VLOOKUP(A6,DATA!C:E,3,FALSE))*F5)),0,(VLOOKUP(A6,DATA!C:E,2,FALSE))+((VLOOKUP(A6,DATA!C:E,3,FALSE))*F5))

    Thanks in advance.

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

    Re: Index formula instead of VLookup

    The nice thing about testing for errors, that you only need to test for what causes the error.
    You don't need to test the whole formula..
    What causes N/A in a vlookup is the value in A6 not being found in column C.
    So you can do this

    =IF(ISNA(MATCH(A6,DATA!C:C,0)),0,(VLOOKUP(A6,DATA!C:E,2,FALSE))+((VLOOKUP(A6,DATA!C:E,3,FALSE))*F5))

    Now, I would further recommend limiting the ranges to specific rows instead of entire columns.
    =IF(ISNA(MATCH(A6,DATA!C1:C100,0)),0,(VLOOKUP(A6,DATA!C1:E100,2,FALSE))+((VLOOKUP(A6,DATA!C1:E100,3,FALSE))*F5))

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    Lahore, Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Index formula instead of VLookup

    Quote Originally Posted by Jonmo1 View Post
    The nice thing about testing for errors, that you only need to test for what causes the error.
    You don't need to test the whole formula..
    What causes N/A in a vlookup is the value in A6 not being found in column C.
    So you can do this

    =IF(ISNA(MATCH(A6,DATA!C:C,0)),0,(VLOOKUP(A6,DATA!C:E,2,FALSE))+((VLOOKUP(A6,DATA!C:E,3,FALSE))*F5))

    Now, I would further recommend limiting the ranges to specific rows instead of entire columns.
    =IF(ISNA(MATCH(A6,DATA!C1:C100,0)),0,(VLOOKUP(A6,DATA!C1:E100,2,FALSE))+((VLOOKUP(A6,DATA!C1:E100,3,FALSE))*F5))
    Thanks Jonmo1, but the thing is my excel takes too much time to open and save. It has 2.82mb size only.... is there any other reason.

    P.S. I removed all the formatting from workbook.

  4. #4
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Index formula instead of VLookup

    Referencing the entire column is the biggest issue for sure. Jonmo1's formula references 300 cells, while yours references around 200,000.
    Please click the * icon below if I have helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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