Results 1 to 4 of 4

convert a number to words in excel 2007

This is a discussion on convert a number to words in excel 2007 within the Excel Questions forums, part of the Question Forums category; Required VBA code for converting a number to word format. Format 1 : US Dollars One million three hundred sixty ...

  1. #1
    New Member excell2007's Avatar
    Join Date
    Sep 2013
    Posts
    2

    Exclamation convert a number to words in excel 2007

    Required VBA code for converting a number to word format.
    Format 1 : US Dollars One million three hundred sixty six thousand & five hundred only.
    Format 2 : Saudi Riyals One million three hundred sixty six thousand & five hundred only.

    Kindly Above two format VBA code provided.

    Thanks & regards,
    shafique ahmed

  2. #2
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    69,348

    Default Re: convert a number to words in excel 2007

    Look here:

    How to convert a numeric value into English words in Excel

    Change the currency description to suit.
    Microsoft MVP - Excel

  3. #3
    apo
    apo is offline
    Board Regular
    Join Date
    Nov 2008
    Location
    Wirrimbi, NSW, Australia
    Posts
    523

    Default Re: convert a number to words in excel 2007

    Using the same code Andrew posted.. appending the currency description to the function... and just modifying the following lines..

    Code:
     Select Case Cents
            Case ""
                'Cents = " and No Cents Only"
                 Cents = " Only"
            Case "One"
                Cents = " and One Cent"
                  Case Else
                Cents = " and " & Cents & " Cents Only"
        End Select
    Sheet3

     AB
    1$1,366,500.00US Dollars One Million Three Hundred Sixty Six Thousand Five Hundred  Dollars Only
    2$1,366,500.00Saudi Ryals One Million Three Hundred Sixty Six Thousand Five Hundred  Dollars Only
    3$1,366,500.55US Dollars One Million Three Hundred Sixty Six Thousand Five Hundred  Dollars and Fifty Five Cents Only
    4$1,366,500.55Saudi Ryals One Million Three Hundred Sixty Six Thousand Five Hundred  Dollars and Fifty Five Cents Only

    Spreadsheet Formulas
    CellFormula
    B1="US Dollars " & SpellNumber(A1)
    B2="Saudi Ryals " & SpellNumber(A2)
    B3="US Dollars " & SpellNumber(A3)
    B4="Saudi Ryals " & SpellNumber(A4)

    Excel tables to the web - Excel Jeanie Html 4

  4. #4
    New Member
    Join Date
    Aug 2013
    Posts
    20

    Default Re: convert a number to words in excel 2007

    Hello,

    Using the above code, how to change the result from:

    One Million Three Hundred Sixty Six Thousand Five Hundred Dollars and Fifty Five Cents Only
    to
    One Million Three Hundred Sixty Six Thousand Five Hundred Dollars and 55/100 Cent(s) Only

    Any idea?



Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com