Your question is an odd one. If you have something specific like that then, obviously, you need to hard-code it. If you need a generic method of applying some condition then we need to know what that condition is. If you are simply asking "how do I display the numbers from 12 to 24 and then display the numbers from 00 to 11" then the answer is no different to displaying any series of numbers: start at the first and continue until you get to the last. If you have two separate series, as you do, then you do it twice. If you don't know ahead of time eactly where the division in the series will be, then that is a different story. You would have to tell us how the division is determined.