Excel HowTo:
-Aviral Mittal

Here I present many interesting Functions, which are commonly desired:

1. Convert Column Number to Column Character:


Function findColChar(colNum As Long) As String
  findColChar = Split(Split(Columns(colNum).Address, "$")(1), ":")(0)
End Function

Now, Try this function:
Sub TrycolNumToColChar()
  MsgBox findColChar(25)
End Sub


2. Convert Column Character to Column Number:

Function findColNum(colChar As String) As Long
  findColNum = Range(colChar & "1").Column
End Function
Now, Try this function:

Sub TrycolCharToColNum()
  MsgBox findColNum("Y")
End Sub





<-Previous                                                                                                Next ->