VBA convert number to text, must have two number after decimal

mdfmkl

New Member
Joined
Sep 4, 2007
Messages
32
Hi All,

If I have a list of numbers in column D, how would I convert these numbers to text and also have two numbers after the decimal?

For example...
48.7 would equal 48.70 in text format
575 would equal 575.00 in text format
12.55 would equal 12.55 in text format
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
37,891
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Hi All,

If I have a list of numbers in column D, how would I convert these numbers to text and also have two numbers after the decimal?

For example...
48.7 would equal 48.70 in text format
575 would equal 575.00 in text format
12.55 would equal 12.55 in text format

Did you want to convert the numbers to text within the same cells (thus changing the existing numbers to text with two decimal places in the same cells)? If this is what you want, do you really need to do it or would simply custom formatting the cells using 0.00 as the format type pattern be okay (that way the cells would still contain numbers, but they would look like you want them to)?

Or did you want a formula that did the conversion in another cell, such as this one...

=TEXT(A1,"0.00")
 

mdfmkl

New Member
Joined
Sep 4, 2007
Messages
32
Did you want to convert the numbers to text within the same cells (thus changing the existing numbers to text with two decimal places in the same cells)? If this is what you want, do you really need to do it or would simply custom formatting the cells using 0.00 as the format type pattern be okay (that way the cells would still contain numbers, but they would look like you want them to)?

Or did you want a formula that did the conversion in another cell, such as this one...

=TEXT(A1,"0.00")

Thanks that formula works perfectly! I must have been trying to do things in a far more difficult manner.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,493
Messages
5,837,684
Members
430,509
Latest member
steve85215

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