This article provides a complete guide to the use of VBA dictionaries.
In VBA we can use Arrays and Collections to store groups of values. For example, we could use them to store a list of customer names, student marks or a list of values from a range of cells. A Dictionary is similar to a Collection.
The Collection, however, has two major faults: We cannot check if the key already exists, and we cannot change the value of an existing item. The VBA Dictionary does not have these issues. You can check if a Key exists and you can change the Item. This makes the Dictionary a very useful and versatile data structure.
Full article: Excel VBA dictionary – A complete guide
Flash Fill is like a copy cat, which can do the things in same pattern in which you are doing. You just have to do that operation once & Flash Fill do it for the rest. It can help you to make your data entry much easier & make you less dependent on complex formula for little things.
This article includes 10 examples of using Excel's Flash Fill feature, showing you how to use it to manage your data effectively.
Full article: How to use Flash Fill in Excel – 10 useful examples
If you work in consulting or some other profession that requires you to analyze data, sooner or later, you'll need to build a histogram. This is because the histogram is one of the most effective methods to visualize and understand a data set.
Conceptually, a histogram is fairly simple, but building a histogram is often a clunky process. This article describes a histogram builder template that makes the process easy. It includes adjustable bin sizes and a chart with dynamic ranges to automatically show only the selected number of bins.
Full article: Excel template: Histogram builder with adjustable bin sizes
Data visualization basically comes down to two techniques: simplification and emphasis.
This article illustrates the techniques via an example:
- Simplify the graph: Remove the border, horizontal grid lines, vertical axis, legend, title, and the color!
- Emphasize your message with text: Add direct labels, a descriptive title, and a descriptive subtitle. Make sure the text is hierarchical.
- Emphasize your message with color: Match your graph's color palette to your organization's logo.
Full article: The simplification and emphasis approach to editing graphs
In this tutorial, you will learn a few quick and efficient ways to check and debug formulas in Excel:
- Use F2 to edit Excel formulas.
- Use F9 to evaluate and debug formula parts.
- Debug a formula by using the Evaluate Formula feature.
- Highlight and match parenthesis pairs in Excel formulas.
- Highlight all cells a given formula refers to.
- Highlight all formulas that reference a given cell.
- Trace formula relationships in Excel (Trace Precedents and Trace Dependents).
- Monitor formulas and their calculated values (Watch Window).
Full article: How to edit, evaluate and debug formulas in Excel
Microsoft are adding new features to Excel, in part driven by user feedback via Excel UserVoice.
Recently added features are:
- Funnel charts. Show values across multiple stages in a process, typically resembling a funnel.
- Improved autocomplete. Searches all functions containing a partial name, rather than requiring an exact match.
TEXTJOIN
. Combines text from multiple ranges with each item separated by a delimiter that you specify.CONCAT
. LikeCONCATENATE
, but supports range references in addition to cell references.IFS
. Boolean conditions are tested in the order that you specify, including an else "catch all".SWITCH
. Evaluates an expression against a list of values in order and returns the first matching result.MAXIFS
. Returns the largest number in a range that meets a single or multiple criteria.MINIFS
. Returns the smallest number in a range that meets a single or multiple criteria.
Full article: What's new in Excel 2016 for Windows
There are a few rules for model design that should be followed when designing the layout of a model. Most experienced modellers will follow these instinctively, as they are generally common sense:
- Separate inputs, calculations, and results, where possible.
- Use each column for the same purpose.
- Use one formula per row or column.
- Refer to the left and above.
- Use multiple worksheets.
- Include documentation sheets.
- Design issues: time series, data collection, model purpose, and model audience.
Full article: The golden rules for model design
Coders have long banned Hungarian notation from their VBA modules. It's meaningless when the code editor is slick enough to show information about a variable.
But now a new crop of equally meaningless, over-used coding errors have begun to litter code modules... and these need to go, too:
- Hungarian notation.
- Long
Sub
andFunction
procedures. - Meaningless naming of variables and procedures.
- Using error handlers, just for the sake of it.
- Using comments, just for the sake of it.
- Not validating data.
- Too many parameters.
- Using magic values.
- Declaring variables incorrectly.
- Coding more than you have to.
Full article: Ten useless VBA coding errors that must be terminated
The VBA Like
operator is something so useful I am often surprised how rarely it is used in Excel and Access VBA.
I often tend to see the Like
operator as the last resort before using Regular Expressions in VBA. It replaces greatly the VBA InStr
function when needing to check if a certain substring is present within a certain string.
The main take-aways are:
- Use the VBA
Like
instead of theInStr
function to check if a string contains a substring. - Consider using the VBA
Like
before resorting to VBA Regular Expressions. - Be sure to master string manipulation too!
Full article: VBA Like operator – using wildcards in conditional statements