Downloads

An Excel eBay Sold Prices Search Tool

I wanted to buy a Blackberry for work, my company don’t provide me with one, preferring smoke signals instead ;-). Obviously I didn’t want to pay top dollar for it so it was off to eBay in search of a bargain. I noticed there was a large spread of prices for the same phone, which lead me to wonder if I could research the sold prices for various items.

It turns out that you can’t via eBay, but some other company does provide an API (with a free option) which can be used to search the sold prices.   Long story short here is a file that you can use to get the prices. You’ll need to get a developers key first though, at:

https://developer.ebay.com/join/Default.aspx

Mine took a day to come through….

“User Guide…”

Get your AppID key and paste it in the “eBay developers App ID” box, then type something in the keyword box, then pick a currency then and parent category, then a child one. Click search!. If you can’t find anything in this category, try a slightly different set of keywords, of check the “search all” box, to search the all the listings.

The “update category data” link under the child category drop down updates the data in the category dropdowns as eBay change them form time to time.

Note on quality….

Over all I’m a bit disappointed by the whole thing. As I’ve thought about it, while writing the app, it’s dawned on me that it’s quite a tricky thing to do. You see the problem is, eBay gets hammered by people selling links to things, or multiply items, or broken things, or replicas, or mis-listings (something listed as “Oakley sunglass, but when you read the detail it says there not actually Oakley’s but they look like them etc), so getting a true average price is actually quite hard… I’m not sure I trust the results. As the API does not return a list of all the items that go into the average price you can’t eye ball the data. But it’s better than nothing I guess.

Download the workbook here:

Unit testing Excel VBA – xlUnit demo

Back in February I did a podcast with Mike Woodhouse, based around testing VBA code. Mike has written a unit testing frame work for VBA code, called xlUnit. Over the last few weeks I’ve been using xlUnit to help write a generic validation class for VBA, so I thought I would put together a little video of how the addin can be used to write tests for your code.

Its in 2 parts because you can only upload videos that are 10 minutes long to you tube.  The first part is the basics and in the second part I show some examples from my project.

You can find out more about xlUnit at Mikes blog, grumpy old programer:

Playing Video Files in VBA forms

A bit more from the past, in this example file you can play a video natively within a VBA form – cool!

videoform

The example file here: Video API

Excel Podcasts, exciting times!

I'm pleased to announce a new feature here on Methods In Excel - Podcasts.

In the first podcast, I caught up with Simon Murphy of  Codematic and Smurf on Spreadsheets for a chat about professional spread sheet development, it was great to catch up with Simon and probe him for his thoughts! Enjoy.

Listen here, or download from the link.

[podcast]http://www.methodsinexcel.co.uk/Downloads/Podcasts/20091109%20Simon%20Murphy%20On%20Professional%20Excel%20Development%20.mp3[/podcast]

Please leave some comments with any feedback about this podcast, and also any ideas for future podcasts.

A comparison of worksheet functions

The response to my blog post “Request an Excel blog post” was not stellar! But 2 people did request things. XL Dennis (aka Dennis Wallentin)  asked about Tables in Excel 2007, and Sam had some interest in function performance.
I did a quick video about tables in Excel 2007, which I need to compliment with one about how to use the new referencing system too, but that’s for another day.
Sam was kind enough to send me some work he’s done around function execution speeds. Sam used the MIE calculation tool to help him time these functions – good stuff!
The workbook is here, and the findings might make more sense when you see them in the worksheet ;-)
In Sam’s own words, here’s what he found out:

The -- version of sumproduct is faster than the other two
Dsum - Sum is faster than Sumproduct and for Excel 2003 and below should be the most preferred way of summarising data
For 2007 - Sumifs beats everything else hands down
-----------------------------------------
A Match/ Index combo is slightly slower than a Vlookup but more flexible.
But a Single Match column and multiple index columns is much faster than Vlookup. Index is super fast
-----------------------------------------
Dynamic Names(with Index / Counta)  are faster than Table References both of which are faster than full column references
Dynamic Names with UDF is faster than Index/Counta
However  Fixed Range references are faster than Dynamic names of any kind

Here are my thoughts:
Sumproduct and DSum do slightly different things and the fact that DSun is faster kinda makes sense. However it’s easy enough to fall into the trap of relying on SP when other functions are better suited, I hardly every use Dsum, in fact I can’t think of a time I did, so this in a handy reminder!  It also makes me think if there are other instances which I’m missing out on, I bet there are loads!
The Sumif functions seems to trump everything that has come before it (see the vlookup times too) we should try and use these as much as possible.  Sumif’s are arguably easier to write and read the sumproducts too.  If the data fits try and use sumifs in 2007 plus. The performance gains are vast!
Having said that there are some instances when only sumprodct will achieve what you need, and for small data sets or number of functions then the benefits might not be noticeable, but for large data sets and high numbers of function calls it’s worthwhile thinking hard about which function to use.
Indexing/match lookups are about twice as fast as the equivalent vlookups in this example, but be careful because often only one vlookup is needed, and the performance gains might not be as good. I really should test this, but I just want to make the post right now!

References to ranges act as you would expect. Tables in 2007 might be a bit slower than dynamic ranges – not sure there’s that much in it though, but there are significantly different – see t-test on wks. Again I would like to see how these results are effect by relative data set size and number of function calls.

So there you have it a fairly comprehensive look at various “lookup” functions in Excel and Excel 2007. Thanks to Sam for his hard work, putting the tests together and shearing his findings with us, good work Sam!
If you have a topic you’d like to be discussed on this blog, then feel free to leave a comment on the Request post and mail me any supporting data you have.

Download Workbook (.xlsm)