>how can I make the last code shorter and more clear .
I'd say it's plenty clear, and the only easy way to make it shorter is to drop the switch statement in favor of something like this:
// Find the display index of the selected column
col = column - 'A';
To nitpickers: yes, I know.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401