Return Column Number
Always post your code for comments and suggestions. ALWAYS!!
??? Why ?!?
As stated, I knew my code was not effective, so no need for posting it for
comments and telling me that...
All I asked for was hints to help me in the right direction - and Jim didn't
need to see my code to actually give me the full solution!
Now, that's what I call helping a fellow Excel nerd :-)
Thanks to Jim :-)))
I've made a (not so) small UDF to return the column number, no
matter how the input is given, ie.:
Function RCN(ColumnAddres as variant) as long
If doesn't matter, if I give en column as...
RCN(3)
RCN("C")
RCN("C7")
RCN("C:C")
RCN("$C$11")
...in all cases it returns the number 3, which is the column number
of the address given.
But, I kind of think my UDF is somewhat long and takes too many
lines for such a relative simple task.
Could anyone guide me to a simple solution, for a small UDF to solve
this little "problem"?
TIA,
|