Keeping Decimal Places in Formulas

excellingatmyjob

New Member
Joined
Aug 19, 2014
Messages
4
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
[TABLE="width: 725"]
<tbody>[TR]
[TD]A1 [/TD]
[TD]B1[/TD]
[TD][/TD]
[TD]C1[/TD]
[TD="align: right"]D1[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 725"]
<tbody>[TR]
[TD]Total Heat Rejection:[/TD]
[TD]733 MBH[/TD]
[TD][/TD]
[TD]Total Heat Rejection:[/TD]
[TD="align: right"]733.00[/TD]
[/TR]
</tbody>[/TABLE]




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

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Left = Auto-filled from right side entry Right = user input data

A1 B1 C1 D1
[TABLE="width: 725"]
<tbody>[TR]
[TD]A1[/TD]
[TD]B1[/TD]
[TD][/TD]
[TD]C1[/TD]
[TD="align: right"]D1[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 725"]
<tbody>[TR]
[TD]Total Heat Rejection:[/TD]
[TD]733 MBH[/TD]
[TD][/TD]
[TD]Total Heat Rejection:[/TD]
[TD="align: right"]733.00[/TD]
[/TR]
</tbody>[/TABLE]

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.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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
Back
Top