My last post showed my, rather poor, attempt at solving this puzzle. Since the solution was posted online I thought I'd have a go at using my Excel skills to plot the path of the dog and the duck. And the aim was to use no VBA.
Month: February 2016
The Dog and the Duck
Time is of the essence with this post so please excuse the strange mix of notations later on. One of my friends sent me this puzzle from fivethirtyeight.com and here is my solution to how the dog needs to catch the duck.
Lots of peoples first instinct is times faster but this is really just a lower bound, i.e. if the dog travels less than π times faster than the duck then the duck can just read radially to the antipoint of the dogs starting position.
There are a few key assumptions here that we can make from the beginning:

Mapping UK Cities and Towns in Excel
Continuing my theme of recreating spreadsheets I’ve seen on Clearly and Simply I’ve had a go at making an Excel map of UK cities and towns that can be highlighted to find their combined population.
Looping over a string in SAS
In SAS it is easy to loop a macro between two numbers
%DO I=1 %TO 10; ... %END;
But if you have a list of non-sequential numbers or text you want to run your macro over, e.g. a list of towns, it can be a bit trickier. This SUGI paper gives a macro which lets you do just that. A few years ago I looked at that macro and didn't really understand how it worked and not wanting to use code I didn't understand I wrote my own version.