Ask Your Question
0

In Calc, how do I force ROUND function to always display two decimal places, even when the last digit is zero.

asked 2019-08-13 15:51:00 +0200

Lauirence5905 gravatar image

updated 2019-08-13 15:52:12 +0200

In a LibreOffice Calc spreadsheet, I have a cell that contains the following formula:

=CONCATENATE("Bill XYZ requires $", SUM(G12/2), " to be set aside each paycheck.")

Let's assume cell G12 is 176.19. The text that is displayed winds up looking like this:

"Bill XYZ requires $88.095 to be set aside each paycheck."

Well, clearly that's not going to work. So I add a "ROUND" to my formula above:

=CONCATENATE("Bill XYZ requires $", ROUND(SUM(G12/2),2), " to be set aside each paycheck.")

Now it displays the following:

"Bill XYZ requires $88.1 to be set aside each paycheck."

How do I get it to display TWO decimals? I want $88.10 in there, not $88.1

Thanks for any help you can give.

edit retag flag offensive close merge delete

Comments

But what SUM is used there for?

Mike Kaganski gravatar imageMike Kaganski ( 2019-08-13 15:56:45 +0200 )edit

Thought I needed it to do the calculation G12/2. I had SUM(G12/2) in there, and wanted to round it, so I added ROUND() to the outside of the SUM() function. Didn't realize I didn't need to include SUM in there -- learn something new every day. :-)

Lauirence5905 gravatar imageLauirence5905 ( 2019-08-13 17:42:23 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2019-08-13 16:02:31 +0200

Use TEXT function:

=TEXT(G12/2;"""Bill XYZ requires $""0.00""  to be set aside each paycheck.""")
edit flag offensive delete link more

Comments

Perfect! Thanks so much!

Lauirence5905 gravatar imageLauirence5905 ( 2019-08-13 17:48:16 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-08-13 15:51:00 +0200

Seen: 24 times

Last updated: Aug 13