+ Reply to Thread
Results 1 to 6 of 6

Change Numbers to Words

Hybrid View

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Post Change Numbers to Words

    hello, everyone

    i want to change my amount to words, in Crore Lac Thousands and Rupees.

    170800 = one lac seventy thousand and eight hundred only


    thanx
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: Change Numbers to Words

    Google Excel Spell Number


    http://www.yogeshguptaonline.com/200...bers-into.html

    And more ...
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Change Numbers to Words

    in this formula, i don't want hundred and rupee, thanx

    Function SpellNumber(amt As Variant) As Variant
    Dim FIGURE As Variant
    Dim LENFIG As Integer
    Dim i As Integer
    Dim WORDs(19) As String
    Dim tens(9) As String
    WORDs(1) = "One"
    WORDs(2) = "Two"
    WORDs(3) = "Three"
    WORDs(4) = "Four"
    WORDs(5) = "Five"
    WORDs(6) = "Six"
    WORDs(7) = "Seven"
    WORDs(8) = "Eight"
    WORDs(9) = "Nine"
    WORDs(10) = "Ten"
    WORDs(11) = "Eleven"
    WORDs(12) = "Twelve"
    WORDs(13) = "Thirteen"
    WORDs(14) = "Fourteen"
    WORDs(15) = "Fifteen"
    WORDs(16) = "Sixteen"
    WORDs(17) = "Seventeen"
    WORDs(18) = "Eighteen"
    WORDs(19) = "Nineteen"
    tens(2) = "Twenty"
    tens(3) = "Thirty"
    tens(4) = "Fourty"
    tens(5) = "Fifty"
    tens(6) = "Sixty"
    tens(7) = "Seventy"
    tens(8) = "Eighty"
    tens(9) = "Ninety"
    FIGURE = amt
    FIGURE = Format(FIGURE, "FIXED")
    FIGLEN = Len(FIGURE)
    If FIGLEN < 12 Then
    FIGURE = Space(12 - FIGLEN) & FIGURE
    End If
    'If Val(Left(FIGURE, 9)) > 1 Then
    'SpellNumber = "Rs "
    'ElseIf Val(Left(FIGURE, 9)) = 1 Then
    'SpellNumber = "Rs "
    'End If
    For i = 1 To 3
    If Val(Left(FIGURE, 2)) < 20 And Val(Left(FIGURE, 2)) > 0 Then
    SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2)))
    ElseIf Val(Left(FIGURE, 2)) > 19 Then
    SpellNumber = SpellNumber & tens(Val(Left(FIGURE, 1)))
    SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1)))
    End If
    If i = 1 And Val(Left(FIGURE, 2)) > 0 Then
    SpellNumber = SpellNumber & " Crore "
    ElseIf i = 2 And Val(Left(FIGURE, 2)) > 0 Then
    SpellNumber = SpellNumber & " Lakh "
    ElseIf i = 3 And Val(Left(FIGURE, 2)) > 0 Then
    SpellNumber = SpellNumber & " Thousand "
    End If
    FIGURE = Mid(FIGURE, 3)
    Next i
    If Val(Left(FIGURE, 1)) > 0 Then
    SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 1))) + " Hundred "
    End If
    FIGURE = Mid(FIGURE, 2)
    If Val(Left(FIGURE, 2)) < 20 And Val(Left(FIGURE, 2)) > 0 Then
    SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2)))
    ElseIf Val(Left(FIGURE, 2)) > 19 Then
    SpellNumber = SpellNumber & tens(Val(Left(FIGURE, 1)))
    SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1)))
    End If
    FIGURE = Mid(FIGURE, 4)
    If Val(FIGURE) > 0 Then
    SpellNumber = SpellNumber & " Paise "
    If Val(Left(FIGURE, 2)) < 20 And Val(Left(FIGURE, 2)) > 0 Then
    SpellNumber = SpellNumber & WORDs(Val(Left(FIGURE, 2)))
    ElseIf Val(Left(FIGURE, 2)) > 19 Then
    SpellNumber = SpellNumber & tens(Val(Left(FIGURE, 1)))
    SpellNumber = SpellNumber & WORDs(Val(Right(Left(FIGURE, 2), 1)))
    End If
    End If
    FIGURE = amt
    FIGURE = Format(FIGURE, "FIXED")
    If Val(FIGURE) > 0 Then
    SpellNumber = SpellNumber & " Only "
    End If
    End Function
    
    
    Sub Add_Trunk_formula_for_remove_decimals()
    
        Range("I1").Select
        ActiveCell.FormulaR1C1 = "=TRUNC(RC[-1])"
        Range("I1").Select
        Selection.AutoFill Destination:=Range("I1:I90"), Type:=xlFillDefault
        Range("I1:I90").Select
        Columns("I:I").Select
        Selection.EntireColumn.Hidden = True
    End Sub
    
    Sub Make_Words_From_Numbers()
        Range("J3").Select
        ActiveCell.FormulaR1C1 = "=SpellNumber(RC[-1])"
        Range("J3").Select
        Selection.AutoFill Destination:=Range("J3:J90"), Type:=xlFillDefault
        Range("J1").Select
        ActiveCell.FormulaR1C1 = "=SpellNumber(RC[-1])"
    End Sub
    
    Sub Border_For_Words()
      
      Range("J3:J90").Select
        Selection.Borders(xlDiagonalDown).LineStyle = xlNone
        Selection.Borders(xlDiagonalUp).LineStyle = xlNone
        With Selection.Borders(xlEdgeLeft)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
        End With
        With Selection.Borders(xlEdgeTop)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
        End With
        With Selection.Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
        End With
        With Selection.Borders(xlEdgeRight)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
        End With
        With Selection.Borders(xlInsideVertical)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
        End With
        With Selection.Borders(xlInsideHorizontal)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
        End With
    End Sub

  4. #4
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Change Numbers to Words

    Thanx alot for replying....

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,630

    Re: Change Numbers to Words

    Answered here: http://www.excelforum.com/excel-gene...s-formula.html

    If you're going to start new threads for the same question, please mark the older ones as solved and provide links to the new thread.

  6. #6
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Change Numbers to Words

    Ok
    tms
    thanx alot

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 03-10-2015, 07:28 AM
  2. change numbers to words
    By aranechan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2011, 01:31 PM
  3. Change Date (numbers) to words.
    By nachousa in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-01-2010, 11:14 AM
  4. change words into numbers
    By Hibore222 in forum Excel General
    Replies: 3
    Last Post: 08-05-2007, 02:06 AM
  5. [SOLVED] Change Month (words) to (numbers)
    By Cathy in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-28-2006, 09:12 AM
  6. How can I change Numbers in WOrds in Excel
    By A J in forum Excel General
    Replies: 3
    Last Post: 05-09-2005, 04:06 AM
  7. how to change numbers into words,
    By Mukesh Dhoot in forum Excel General
    Replies: 1
    Last Post: 03-19-2005, 08:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1