You'll find that I use named ranges rather than cell references pretty much throughout. This is because I want to separate the usage of some of these functions from where the data is. I'm not saying that you have to use named ranges all the time, but I hope you'll see the value of creating them for data that may change or be referred to from multiple places. In any case, working through the examples should give you enough familiarity to make the right choices.
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation >