column adjustments
Here is a Function, courtesy Chip Pearson.
Function ColumnLetter(ColNumber) As String
ColumnLetter = Left(Cells(1, ColNumber).Address(True, False), _
1 - (ColNumber 26))
End Function
To use the function in code, assume you have set a column number to variable
myCol then:
myColLtr = ColumnLetter(myCol)
myColLtr will now equal an alpha column designation.
"dstiefe" wrote:
I am writing the VBA code that is telling me what column a certain piece of
data is in...but instead of giving me the number of the column...is there
someway through VBA that it i can get the letter reference.
|