+ Reply to Thread
Results 1 to 11 of 11

Vlookup function not updating when i insert a col.

Hybrid View

  1. #1
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,535

    Re: Vlookup function not updating when i insert a col.

    Extending JB's post, this:

    =IF(ISERROR(VLOOKUP(A2,Final!$A$2:$Q$68,15,FALSE)),"NA", VLOOKUP(A2,Final!$A$2:$Q$68,15,FALSE))

    can become:

    =IF(ISNA(MATCH(A2,Final!$A$2:$A$68,0)),"NA",INDEX(Final!$Q$2:$Q$68,MATCH(A2,Final!$A$2:$A$68,0)))

    As JB said there are numerous benefits to an INDEX/MATCH approach over VLOOKUP, namely:

    a) the criteria value need not reside in the left most column of the range as it does with VLOOKUP

    b) inserting columns etc should have no effect
    (the ranges should update accordingly ... as long as you don't delete the columns being referenced of course!)

    c) INDEX/MATCH as used here has far fewer "dependencies"
    (you're only referencing A2:A68 and Q2:Q68 whereas with VLOOKUP you're referencing the entire range A2:Q68)

    Note: you could use a MATCH function within the VLOOKUP to ascertain the appropriate Column Number rather than hardwiring the value (15), this would then adapt as columns were added, however, an INDEX/MATCH approach is still better IMO

  2. #2
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: Vlookup function not updating when i insert a col.

    Thanks for the info.

    Sorry for not responding sooner. I am working on about 10 different things at once.

    I will review the Index and Match function closer. However, before i do i did have a question. I have stayed away from the "array" functions for some reason. I have used them in the past and for the life of me i cant remember why i decided to not use them. I cant remember if it has to do with speed or something having to do with automatic updating. Are there disadvanges to using array functions?

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,535

    Re: Vlookup function not updating when i insert a col.

    Where are you using an Array ?

    Yes, Arrays adversely impact performance if over used.

+ 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