How to Convert Number to Text with 2 Decimal Places in Excel (5 Ways)

Method 1 – Use the Apostrophe Symbol to Convert Number to Text with 2 Decimal Places in Excel

Steps:

  • Put an apostrophe sign (‘) in front of each number. It will convert the number to text with 2 decimal places.

Use the Apostrophe Symbol to Convert Number to Text with 2 Decimal Places in Excel

Read More: How to Convert Number to Text with Commas in Excel


Method 2 – Apply the Format Cells Command to Convert Number to Text with 2 Decimal Places in Excel

Step 1:

  • Copy the price of the products and paste in column D.

Apply the Format Cells Command to Convert Number to Text with 2 Decimal Places in Excel

Step 2:

  • Press Ctrl + 1 on your keyboard. A Format Cells dialog box pops up. Select Number and choose Text from the Category. Press OK.

  • Numbers can now be converted to text with 2 decimal places as shown in the image below.

Apply the Format Cells Command to Convert Number to Text with 2 Decimal Places in Excel


Method 3 – Convert Number to Text with 2 Decimal Places Using the TEXT Function in Excel

Step 1:

  • Select a cell in the Price column to add decimal points to that cell value. We have selected cell C13.
  • Right-click on that cell. A menu will appear. Click on Format Cells.

Convert Number to Text with 2 Decimal Places Using the TEXT Function in Excel

  • In the Format Cells window, increase the decimal places to 2. Click OK.

  • We will increase the decimal places to different numbers for different values of the Price.

Convert Number to Text with 2 Decimal Places Using the TEXT Function in Excel

Step 2:

  • Add the following formula in cell D5.
=TEXT(C5,"##0.00")
Formula Breakdown:

  • The TEXT function allows you to modify the appearance of a number by using format codes to apply formatting to it.

  • Press ENTER to convert number in cell C5 to text with 2 decimal places.

Convert Number to Text with 2 Decimal Places Using the TEXT Function in Excel

  • Drag down the fill handle of cell D5 to apply the formula to the rest of the cells.

Convert Number to Text with 2 Decimal Places Using the TEXT Function in Excel

  • It will convert all the numbers in the Price column to text with 2 decimal places.


Method 4 – Use the IF Function to Convert Number to Text with 2 Decimal Places in Excel

Steps:

  • Add decimal points to the cell values in the Price column.
  • Enter the following formula in cell D5.
=IF(CELL("FORMAT",C5)="F2", TEXT(C5,"0.00"), TEXT(C5, 0))
Formula Breakdown:

  • IF function will check if the number has 2 decimal points.
  • If the number has 2 decimal points, the TEXT function will convert the number to text while keeping those 2 decimal points with the number.
  • If the number does not have 2 decimal points, then the TEXT function will convert the number to text without changing anything.

Use the IF Function to Convert Number to Text with 2 Decimal Places in Excel

  • Press ENTER to convert.

  • Drag the fill handle of cell D5 to apply the formula to the rest of the cells.

Use the IF Function to Convert Number to Text with 2 Decimal Places in Excel

  • All the numbers in the Price column will be converted to text with 2 decimal places.

Use the IF Function to Convert Number to Text with 2 Decimal Places in Excel


Method 5 – Run a VBA Code to Convert Number to Text with 2 Decimal Places in Excel

Step 1:

  • Select the number range cell C5 to C13. From the Developer tab, go to,

Developer → Visual Basic

Run a VBA Code to Convert Number to Text with 2 Decimal Places in Excel

  • Click on the Visual Basic ribbon. A window named Microsoft Visual Basic for Applications – Convert Number to Text pops up. Go to,

Insert → Module

Step 2:

  • In the Convert Number to Text module, enter the following VBA code:
Sub Decimal_Places()
    Dim R As Range
    Set R = Selection
    R.NumberFormat = "#,##0.00;-#,##0.00"
End Sub

Run a VBA Code to Convert Number to Text with 2 Decimal Places in Excel

  • Run the VBA. To do that, go to,

Run → Run Sub/UserForm

  • The numbers will be in a format with two decimal places.

Run a VBA Code to Convert Number to Text with 2 Decimal Places in Excel

Step 3:

  • Enter the TEXT formula used in method 3 in cell D5 to convert the number in cell C5 to text.

  • Drag down the Auto Fill handle. All the numbers in the Price column will be converted to text with 2 decimal places.


Things to Remember

To open the VBA editor Press ALT + F11. Press ALT + F8 to bring up the Macro window.

If you do not have a Developer tab, make it visible by going to:

  • File → Option → Customize Ribbon

Download Practice Workbook


Related Articles


<< Go Back to Excel Convert Number to Text | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdur Rahim Rasel
Md. Abdur Rahim Rasel

MD. ABDUR RAHIM is a marine engineer proficient in Excel and passionate about programming with VBA. He views programming as an efficient means to save time while managing data, handling files, and engaging with the internet. His interests extend to Rhino3D, Maxsurf C++, AutoCAD, Deep Neural Networks, and Machine Learning, reflecting his versatile skill set. He earned a B.Sc in Naval Architecture & Marine Engineering from BUET, and now he has become a content developer, creating technical content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo