+ Reply to Thread
Results 1 to 4 of 4

IF, ISNA & VLOOKUP formula optimisation.

  1. #1
    Registered User
    Join Date
    09-18-2011
    Location
    Southampton
    MS-Off Ver
    Excel 2007
    Posts
    8

    Question IF, ISNA & VLOOKUP formula optimisation.

    Hello everybody.

    I have quite a complicated (for me) spreadsheet that has a lot of look ups. I would like to optimise parts of this spreadsheet by altering my code to try and speed up the workbook.

    Basically I search for a customer number and return a figure when found using a VLOOKUP. I want to protect my spreadsheet from N/A errors so have an IF statement to make sure I always return a number. Please see below:

    Please Login or Register  to view this content.
    Is there a way of removing the second lookup by using different code so I am only doing 1 per formula. The workbook has something like ~3000 formulas that have lookups in, so if each formula has 2 lookups the workbook is processing 6000 look ups!!!! Crikey!

    Any and all help is appreciated.
    Please request any more information you may need that I have left out!

    Kris

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: IF, ISNA & VLOOKUP formula optimisation.

    With 2007 you can use...

    =IFERROR(VLOOKUP(D3,RouteData!$F$4:$I$592,2,FALSE),D3)
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    09-30-2012
    Location
    Perth, Australia
    MS-Off Ver
    MSO all versions to 2007
    Posts
    30

    Re: IF, ISNA & VLOOKUP formula optimisation.

    To simplify your error checking, just use iferror:
    Please Login or Register  to view this content.
    To avoid the pitfalls of vlookup, (requires left hand column for lookup range, requires lookup range to be alpha/numerically sorted, is finiccy about about the lookup data type) consider modifying the lookup to use INDEX-MATCH.
    Please Login or Register  to view this content.

    Muzza68


    Edit: yeah I know, too slow to finish reply.....more pressing tasks at hand here.
    Last edited by Muzza68; 11-25-2012 at 12:49 AM.

  4. #4
    Registered User
    Join Date
    09-30-2012
    Location
    Perth, Australia
    MS-Off Ver
    MSO all versions to 2007
    Posts
    30

    Re: IF, ISNA & VLOOKUP formula optimisation.

    Please Login or Register  to view this content.
    For you that would need to be something like:
    Please Login or Register  to view this content.

+ 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