Converting dollar amount to letters

jostone

New Member
Joined
Jan 6, 2014
Messages
3
I would like to convert (3.95) to say "CIE", is something like this possible. I'm wanting to create labels for items, but not have dollar amount on label. Prefer some sort of code.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
37,149
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
You did not tell us what the digit 0 should be converted to, so I assumed the letter Z. Here is a function that will do the conversion, but it important to note that the number should be a text values when passed into the function so that trailing zeroes are not lost.

Code:
Function NumbersToLetters(S As String) As String
  Dim X As Long
  NumbersToLetters = Replace(Replace(S, ".", ""), ",", "")
  For X = 1 To Len(NumbersToLetters)
    Mid(NumbersToLetters, X, 1) = Replace(Chr(64 + Mid(NumbersToLetters, X, 1)), "@", "Z")
  Next
End Function
 

jostone

New Member
Joined
Jan 6, 2014
Messages
3
You did not tell us what the digit 0 should be converted to, so I assumed the letter Z. Here is a function that will do the conversion, but it important to note that the number should be a text values when passed into the function so that trailing zeroes are not lost.

Code:
Function NumbersToLetters(S As String) As String
  Dim X As Long
  NumbersToLetters = Replace(Replace(S, ".", ""), ",", "")
  For X = 1 To Len(NumbersToLetters)
    Mid(NumbersToLetters, X, 1) = Replace(Chr(64 + Mid(NumbersToLetters, X, 1)), "@", "Z")
  Next
End Function

Rick, thank you for the quick response. Can you please be more explicit? If I have a column (column A) of dollar values in the cells, let's say in next column (B) what is the formula I would use to convert column A dollar values to letters? Sorry for being so naive.
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
37,149
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Rick, thank you for the quick response. Can you please be more explicit? If I have a column (column A) of dollar values in the cells, let's say in next column (B) what is the formula I would use to convert column A dollar values to letters? Sorry for being so naive.
Here are the instruction for installing and using a UDF (user defined function)...

HOW TO INSTALL UDFs
------------------------------------
If you are new to UDFs, they are easy to install and use. To install it, simply press ALT+F11 to go into the VB editor and, once there, click Insert/Module on its menu bar, then copy/paste the above code into the code window that just opened up. That's it.... you are done. You can now use NumbersToLetters just like it was a built-in Excel function. For example,


=NumbersToLetters(A1)


If you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.
 

Forum statistics

Threads
1,136,354
Messages
5,675,294
Members
419,559
Latest member
BraytonM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top