>>>>I don't see how switch can help - switch is only for checking a single variable against predefined values.
>>>
>>>That's the problem.... if its not in a blog post, you can't figure it out....Learn to think outside a blog post...
>>
>>Can you stop answering my questions in this way? I can figure out if it's possible with a switch, but in this particular case several IF statements are easier to implement. If you have nothing to say about the nature of the question, don't add your comments as they don't help.
>
>You said a switch couldn't handle your case..... ergo my reply after Gregory showed you how to do it with a switch.
Gregory's code is way too complicated. I think for what I needed it for the if statements were actually easier to understand and better. Or Viv's solution (I added it in comments as alternative solution, but decided to keep my original).
If it's not broken, fix it until it is.
My Blog