Rounding up in a userform

seacrest

Active Member
Joined
Aug 15, 2002
Messages
301
Hi,

I need some help with rounding up to the nearest 100 in a textbox userform
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Care to give us a bit more info?
 
Upvote 0
What about
VBA Code:
TextBox1.Value = WorksheetFunction.Ceiling(90, 100)
 
Upvote 0
Just need to round up to the nearest 100 for the following code
TextBox9.Value = TextBox7.Value * TextBox8.Value
 
Upvote 0
How about
VBA Code:
TextBox9.Value = Application.Ceiling(TextBox7.Value * TextBox8.Value,100)
 
Upvote 0
Solution
With regard to mohadin and Fluff's suggestion to use the Ceiling function (referencing either WorksheetFunction or Application) , I just want to point out to those who might not be aware there is a VBA equivalent of the Excel CEILING.MATH function (like the CEILING function but has an option on how to deal with negative values) called Ceiling_Math (again, referencing either WorksheetFunction or Application) whose arguments are the same as the CEILING.MATH function.
 
Upvote 0
With regard to mohadin and Fluff's suggestion to use the Ceiling function (referencing either WorksheetFunction or Application) , I just want to point out to those who might not be aware there is a VBA equivalent of the Excel CEILING.MATH function (like the CEILING function but has an option on how to deal with negative values) called Ceiling_Math (again, referencing either WorksheetFunction or Application) whose arguments are the same as the CEILING.MATH function.
Thanks
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,268
Members
448,558
Latest member
aivin

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