Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how do i get word conversion number to text in excel (100 = "hundred")
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See http://www.xldynamic.com/source/xld.xlFAQ0004.html
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "ismayil" wrote in message ... how do i get word conversion number to text in excel (100 = "hundred") |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "ismayil" wrote: how do i get word conversion number to text in excel (100 = "hundred") Private Function GetColumnName(ByVal colNumber As Integer) As String Dim colName As String = String.Empty Dim quotient As Integer = 0 Dim remainder As Integer = 0 If colNumber <= 26 Then colName = Convert.ToChar(colNumber + 64) Return colName Else Dim fChar As String = String.Empty Dim sChar As String = String.Empty quotient = colNumber \ 26 remainder = colNumber Mod 26 If remainder = 0 Then fChar = Me.GetColumnName(quotient - 1) Else fChar = Me.GetColumnName(quotient) End If If remainder = 0 Then sChar = "Z" Else sChar = Me.GetColumnName(remainder) End If colName = String.Concat(fChar, sChar) Return colName End If End Function |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Function GetColumnName(ByVal colNumber As Integer) As String
That can be greatly simplified to: Function ColLetter(ColNum As Long) As String ColLetter = Split(Worksheets(1).Cells(1, ColNum).Address(True, False), "$")(0) End Function -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "YourHelp" wrote in message ... "ismayil" wrote: how do i get word conversion number to text in excel (100 = "hundred") Private Function GetColumnName(ByVal colNumber As Integer) As String Dim colName As String = String.Empty Dim quotient As Integer = 0 Dim remainder As Integer = 0 If colNumber <= 26 Then colName = Convert.ToChar(colNumber + 64) Return colName Else Dim fChar As String = String.Empty Dim sChar As String = String.Empty quotient = colNumber \ 26 remainder = colNumber Mod 26 If remainder = 0 Then fChar = Me.GetColumnName(quotient - 1) Else fChar = Me.GetColumnName(quotient) End If If remainder = 0 Then sChar = "Z" Else sChar = Me.GetColumnName(remainder) End If colName = String.Concat(fChar, sChar) Return colName End If End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Number conversion to text in Ms excel | Excel Worksheet Functions | |||
how i convert "100" to "hundred"( number to text) in excel-2007 | Excel Worksheet Functions | |||
macro for converting number stored as "text" (or preceeded with ') to "number" formatting | Excel Programming | |||
macro for converting number stored as "text" (or preceeded with ') to "number" formatting | Excel Programming | |||
Excel conversion to word 2000 Text | Excel Programming |