Dude,
i have an excel worksheet that does all the fancy stuff. Works perfectly for an RAF logbook. If you have a hotmail or something, i can send it to you. Trouble is, i'm off on holiday tomorrow am, so you'll get it in 2 weeks if that's ok!
Wish i could say i did it myself, but i'm not nearly spotty enough.