Thanks Dan! Worked like a charm.
If you have the time, may I ask what is going on in the expression? I thought I would need to use a variety of math/trig functions to figure it out, but yours seems free of that. No worries if you do not have the time.