Yes, Vlookup is a very resource-intensive function
I did a simple test…
IFERROR is 30% faster than IF+ISERROR
If your sheet takes 7 minutes to calculate using the IFERROR formula, it would take 10 minutes with the IF+ISERROR version
And when I did the suggested test by Jon Peltier, I got these results…
IFERROR (with MATCH) is 10% faster than IFERROR (with VLOOKUP)
]]>Great tip.
]]>That is interesting…
]]>The formula in B1 on Sheet 2 would read:
=IF(COUNTIF(Sheet1!A1:A100,A1)>0,VLOOKUP(A1,Sheet1!A1:G100,5,FALSE),0)
if the countif fails (ie, returns 0), there’s no reason to issue the VLOOKUP as it wouldn’t find the value anyhow.
]]>Nick, your approach is a little lighter, but to me it’s still almost as bulky as writing the original approach. I haven’t tested it myself, but I’d be concerned that the initial result would leave me open to a later error with the VLOOKUP if they didn’t return the exact same results.
Peder, glad you found this useful. Sadly, the “What’s New” help article in Excel 2007 doesn’t actually list any of the new functions. The closest I found was this article on the Visio MVP’s site. For VBA, there were some issues being tracked at VBA Express in this thread.
Jon, fair point on MATCH’s speed. I always seem to reach to VLOOKUP first, as old habits die hard. It would still leave you with a pretty long formula though. I wish IFERROR had been there several versions ago, as this approach is much cleaner. (Would help to speed up to use MATCH within that, rather than VLOOKUP though.)
]]>We’re going to start using Office 2007 in my department in the near future. In regards to this I’m on the lookout for some good resources about differences between Excel 2003 and 2007 and also possibly a list of new functions/functionality (like the IFERROR formula).
I’m not sure if it even exists, but I would very much like a summary of VBA pitfalls when developing in Excel 2007 from a Excel 2003 point of view. Also some perspective on what to be on the lookout for when converting old 2003 projects to 2007.
Any good recommendations on where to start reading up?
]]>