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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,975
Office Version
  1. 2016
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,594
Messages
5,637,299
Members
416,963
Latest member
zazama

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