VBA On Error Statement – Handling Errors in Excel Macros

While writing Excel Macros we generally put more focus on the coding part and getting the desired result but during this process, we forget an important thing i.e. Error handling. Error handling is an important part of every code and VBA On Error Statement is an easy way for handling unexpected exceptions in Excel Macros.A well-written macro is … [Read more...]

VLOOKUP In VBA – With Examples

In my earlier post, I had written about VLOOKUP in Excel. It was a massive post of around 2500 words, it explains most of the things about the vertical lookup function in excel. Today’s post is an extension to that post and here we will understand how to apply a VLOOKUP in VBA.If you haven’t read that post then I would strongly recommend you … [Read more...]

VBA MsgBox – How to use

In VBA, the MsgBox function is used for displaying a dialog box with a predefined message. It returns an integer value based on the button clicked by the user, this helps to keep a track of the option selected by the user.VBA Msgbox can be mainly used for the below three reasons: For displaying a message to the end-user. For graceful … [Read more...]

Sum Cells based on Background Color

Few weeks back, one of my regular visitors dropped me an email describing an issue that he was facing. His task was to add the contents of certain cells based on their background colors.As we all know, Excel by default has no formula or feature to calculate such a thing. So, in this post I will share few methods that will help you to achieve … [Read more...]

VBA DIR Function – How to Use in Excel

DIR is a very special function in VBA, its job is to return a string representing the name of a file, directory, or archive that matches a specified pattern. DIR function only returns the first file name or folder name from a location that matches the specified attributes.To fetch other file names or folder names from that location that match … [Read more...]

VBA Split Function – How to Use

VBA, just like any other language gives you a set of functions to perform various operations on strings. And VBA Split is one of those string functions. Microsoft introduced the Split function with VBA Version 6 (in Office 2000).As the name suggests, the job of a Split statement is to break, split, or divide a string based on a particular … [Read more...]

Excel VLOOKUP – Massive Guide with 8 Examples

VLOOKUP is one of the most useful and important functions in Microsoft Excel. It is generally used to look up a particular value in huge data sheets where manual intervention can be cumbersome. The alphabet ‘V’ in VLOOKUP stands for “Vertical” so this function is sometimes also called vertical lookup.The term “Vertical” signifies that it can be … [Read more...]

How to Find External Links or References in Excel

Manually finding external links or references in a spreadsheet is a cumbersome task.  Microsoft does not have any inbuilt function that can find external references or links but still there do exist some workarounds to do this. And this is what I am going to share with you today.Method 1: Finding external References by using the find … [Read more...]