Round Up with VBA by using the Excel RoundUp function. By calling the Worksheet Function, your VBA macro will round numbers up just like in Excel.
Pass this VBA function a range of cells and a number that you want to find a number closest to and it will return the value in the range closest to your target.
We've combined each of our comprehensive wellsrPRO VBA training reference guides into a single bundle with over 150 tips and macros covering the 80 most important topics in VBA.
Tell me more
Generate random numbers in VBA by using the Rnd function. Make the numbers even more random by adding the VBA Randomize statement.
The VBA Round function behaves differently than the Excel Worksheet ROUND function. This tutorial explains the differences between the two rounding functions.
Learn how you can align the text in each column of your UserForm ListBox differently by using the class module I introduce in this tutorial.
Use Excel to record your mouse clicks and cursor movements and convert them directly into VBA macros so you can easily automate complex tasks, like copying data from a website.
Find out how to assign a macro to a shape in Excel so you can quickly run your macro by simply clicking the shape in your spreadsheet.
Learn how to show a system tray notification balloon in your start menu the moment your macro is done by following this awesome Excel VBA tutorial.
Use the VBA Dir function to check if a file exists. The VBA Dir function returns the name of a valid file, so you can use it to test whether a file exists.
Return the value in one range based on the relative position of a value in another range without the index, match or offset functions by using this Excel UDF.
This tutorial shows you how to hide the border on your UserForm using VBA. A UserForm without a title bar and X button are far cleaner than normal UserForms.
subscribe via RSS
To access parts 2 and 3 of my free online VBA training program, enter your email address below.