Round up

mks

Board Regular
Joined
Aug 28, 2009
Messages
173
Hi ,

Can you please help me to update following formula to give value upto two decimal places.

Range(sOut).Value = ((Range(sInp).Value * (ActiveCell.Value)) & " Sqm ")

thanks
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
The title of the post is round up do want it to always round up or do you want the standard rounding.

If standard rounding use the Format Function.
Format(1.235, "0.00") = "1.24"
Format(1.234, "0.00") = "1.23"

Range(sOut).Value = Format((Range(sInp).Value * (ActiveCell.Value)), "0.00") & " Sqm "

To force a round up at two decimal places use the Excel Ceiling Function with the Format function for 0th in the decimal places.
Format(Ceiling(1.230001, 0.01), "0.00") = "1.24"

Range(sOut).Value= Format(Application.WorksheetFunction.Ceiling(Range(sInp).Value * (ActiveCell.Value), 0.01), "0.00") & "sqm "
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,813
Members
452,945
Latest member
Bib195

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