Vlookup - excel slow

human2014

Board Regular
Joined
Oct 14, 2014
Messages
52
Hello everybody

is there a way to make an excel file quicker?

I took this file over from another person and it has many vlookups.
My guess is vlookup could be the reason for this.

Example of formulas:
=VLOOKUP($C179985,'Mapping for Salary Tracker'!$A$2:$A$48,1,FALSE)
=IFERROR((VLOOKUP(RIGHT($A179985,7),'Mapping for Salary Tracker'!$L:$M,2,FALSE)),"-")
=IFERROR((VLOOKUP(RIGHT($A179985,7),'Mapping for Salary Tracker'!$O:$P,2,FALSE)),"-")
=IFERROR((VLOOKUP(RIGHT($A179985,7),'Mapping for Salary Tracker'!$S:$T,2,FALSE)),"-")
=VLOOKUP(VALUE(A179985),Sheet2!$A:$C,3,0)

thanks for the feedback
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I've seen this sort of this before.
Two things that can speed it up:
1) By using a "helper column" to perform the =RIGHT(a179985,7) calculation ahead of time.

For example, say your helper column is in column Z. So Z179985 contains formula =RIGHT(A179985,7). Then use column Z cell in your formula:
=iferror(vlookup(z179985, LMrng, 2, false),"-")
(I'll explain LMrng next...)

2) instead of using lookup range of entire columns, create a named range and use that.

For example, instead of referring to Mapping for Salary Tracker sheet, range column L thru M, select the used range of L:M in there. For example, say it's L2:M200000. Call this range "LMrng".

Put the two together, and you get
=iferror(vlookup(z179985, LMrng, 2, false),"-")

Do this for all of your lookup ranges. Give them meaningful names like Salaryrng, OPrng, etc. Don't name them "Fred" "Alice" ...
This will speed things up.
 
Upvote 0
Using Index(Match(.... also tend to be faster.

If you convert it to a data table the references will adjust automatically, otherwise you might need to have a formula statement for your named range if it increases over time.
 
Upvote 0
I like those ideas but the file has more than 365000 rows.
How can I name a range ?
I want to replace vlookup with index and match but I get an error everytime
 
Upvote 0
your first iferror formula appears to be = iferror(vlookup(something, somewhere, 2, false)), "-"

if it is not an error there is nothing for it to do

eg =if(iserror(a1/a2),"error","ok")
 
Upvote 0
So you are saying I should replace it ?

your first iferror formula appears to be = iferror(vlookup(something, somewhere, 2, false)), "-"

if it is not an error there is nothing for it to do

eg =if(iserror(a1/a2),"error","ok")
 
Upvote 0
your first iferror formula appears to be = iferror(vlookup(something, somewhere, 2, false)), "-"

if it is not an error there is nothing for it to do

eg =if(iserror(a1/a2),"error","ok")

He does have an error there, but I think OldBrewer is confusing the IF function with the IFERROR function.
OP just had an extra parentheses.

Refer to my tips above, and note that there's just a single ")" after "False" in the vlookup.
=iferror(vlookup(z179985, LMrng, 2, false),"-")

And yes, you can have a named range that is 1000s of rows long.
 
Upvote 0
How do you name a range ?

He does have an error there, but I think OldBrewer is confusing the IF function with the IFERROR function.
OP just had an extra parentheses.
[/COLOR]
Refer to my tips above, and note that there's just a single ")" after "False" in the vlookup.
=iferror(vlookup(z179985, LMrng, 2, false),"-")

And yes, you can have a named range that is 1000s of rows long.
 
Upvote 0

Forum statistics

Threads
1,215,957
Messages
6,127,936
Members
449,411
Latest member
AppellatePerson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top