-
How do you write if then statements in Excel?
In our example, orders over $15 qualify for free shipping. Here we want to calculate if the order qualifies for free shipping so we can filter and identify them. We are going to create a user defined, custom function and pass the price as the only argument, and return the result of “True” or “False”…
-
How do I automatically open a UserForm in Excel?
In order to open a UserForm automatically, you will need to use the “open” event of the Excel workbook. Here is the code to add to the “ThisWorkbook” object’s Open event: Private Sub Workbook_Open() UserForm1.Show End Sub After you save and close the workbook, and then reopen it, the UserForm will automatically appear. PS. Make…
-
What is the difference between ComboBox and ListBox?
The question here is “what is the difference between combobox and listbox?” Basically with a combobox you see one selected item at a time, and with a listbox you can see multiple items, and multiple selected items. Consider the following 2 examples, where you have a userform with 2 controls displaying the same data listed…
-
What is a VBA function?
A VBA function a function like one that is already in Excel (sum, average, count etc.) which allows you to extend the functionality of Excel. A function returns a value. So basically you can create your own “sum” function: Function MySum(arg1, arg2) As Double Dim dblTemp As Double dblTemp = arg1 + arg2 MySum =…
