# Keeping Decimal Places in Formulas

#### excellingatmyjob

##### New Member
Help!

I have users input a number into a cell. I want that number to automatically format to have 2 decimal places. Then I am using that number and equation to auto-fill another section that has units also autofill in the cell. See below:

Left = Auto-filled from right side entry Right = user input data

A1 B1 C1 D1
 A1 B1 C1 D1

<tbody>
</tbody>
 Total Heat Rejection: 733 MBH Total Heat Rejection: 733

<tbody>
</tbody>

So, the user inputs data into D1, the cell is formatted to have 2 decimal spaces

The formula in B1 = =D1&" MBH"

How do I get B1 to display 733.00 MBH - keeping the decimal places.

Thank you!

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Try

=TEXT(D1,"0.00")&" MBH"

Left = Auto-filled from right side entry Right = user input data

A1 B1 C1 D1
 A1 B1 C1 D1

<tbody>
</tbody>
 Total Heat Rejection: 733 MBH Total Heat Rejection: 733

<tbody>
</tbody>

So, the user inputs data into D1, the cell is formatted to have 2 decimal spaces

The formula in B1 = =D1&" MBH"

How do I get B1 to display 733.00 MBH - keeping the decimal places.
Two ways...

First method: You could Custom Format the cell using this Type pattern... 0.00" MBH"

Second method: Use this formula instead of the above Custom Format... =TEXT(D1,"0.00"" MBH"""

The difference is that the first method's result will be a number (still usable in calculations) and the second method's result will be text.

Replies
5
Views
377
Replies
2
Views
264
Replies
5
Views
221
Replies
38
Views
1K
Replies
5
Views
242

1,219,914
Messages
6,150,933
Members
450,994
Latest member
MacOrch

### 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.

### Which adblocker are you using?

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

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