+ Reply to Thread
Results 1 to 4 of 4

Improved numbers -> to -> currency macro

  1. #1
    Registered User
    Join Date
    04-23-2017
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    1

    Post Improved numbers -> to -> currency macro

    Here's an improved macro that converts a number (with decimals) to a string for display.
    (e.g. currency - change the currency words (dollars / cents) for yourself)
    This is improved by making truly readable text - including purals and intermediate 'and' placement.
    e.g.
    One hundred and Twenty Three thousand, Four hundred and Fifty Six dollars and Seventy Five cents


    Paste this code into a new 'MODULE'
    Open your workbook in Excel.
    Press Alt+F11 to open Visual Basic Editor (VBE).
    Right-click on your workbook name in the "Project-VBAProject" pane (at the top left corner of the editor window) and select Insert -> Module from the context menu.
    Please Login or Register  to view this content.
    Target cell should contain
    =NumToText(sourceNumber or cell reference)
    Save as an XLSM file
    Last edited by lastchancename; 04-23-2017 at 10:26 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Improved numbers -> to -> currency macro

    Thread moved to the Tips & Tutorials section.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    01-05-2017
    Location
    New York
    MS-Off Ver
    Office 2016
    Posts
    206

    Re: Improved numbers -> to -> currency macro

    I just checked this out, it's really cool and might even be useful. The only thing is, when you enter 100000 (e.g. one hundred thousand dollars) the result comes up as one hundred dollars.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Improved numbers -> to -> currency macro

    Hi LastChance and welcome to the forum,

    There are a lot of these "numbers to spellings" around.
    There is one in PUP 7.2 called Dollars to Text which I just checked and does the 100000 correctly.
    http://spreadsheetpage.com/index.php/pupv7/home

    https://www.ablebits.com/office-addi...s-words-excel/

    http://www.familycomputerclub.com/ho...-in-excel.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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. [SOLVED] Can this 'append' macro be improved on
    By Robn02 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2017, 11:28 AM
  2. To calculate/sum all numbers that are formatted in currency?
    By Dwexdwex in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-12-2013, 01:14 AM
  3. Transforme strange numbers into currency.
    By BlitzMX in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-25-2012, 04:41 AM
  4. Improved Word Count Macro
    By Amejin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2008, 06:09 AM
  5. When I type numbers in currency all I get is #######
    By mommy4shane in forum Excel General
    Replies: 3
    Last Post: 12-03-2005, 03:35 AM
  6. How do I sum currency only numbers in a range?
    By construction guy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2005, 03:06 AM
  7. [SOLVED] Currency and Numbers display
    By Billy Parkinson in forum Excel General
    Replies: 0
    Last Post: 01-11-2005, 09:06 PM

Tags for this Thread

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