Excel already has this feature. are you sure you wish to re-invent the wheel? Have a look here. https://answers.microsoft.com/en-us/...6-64660f0a5b2f