Excel DATEDIF Function – Calculate the difference between two dates

DATEDIF is a hidden function in Excel. As the name suggests the job of this function is to calculate the difference between two given dates.I have referred this function as hidden because, for some reason Microsoft has decided not to document this function. And because of this you won’t find this function in the Formula Tab.To verify this, … [Read more...]

VBA IF Statement – Explained With Examples

IF is one of the most popular and frequently used statements in VBA. IF statement in VBA is sometimes also called as IF THEN ELSE Statement. The task of the IF Statement is to check if a particular condition is met or not.If you have followed my earlier posts, then you would remember that we discussed If Function in Excel. The IF Function in … [Read more...]

Excel Text Function – How to Use

Excel Text function falls under the category of String Formulas. As the name suggest the task of Text Function is to convert a numeric value to a string.This function comes quite handy when you want to display numbers in a more readable format or in such a format that makes more sense. Another situation where Text Formula can be used is : while … [Read more...]

FileSystemObject in VBA – Explained

FileSystemObject also called FSO, provides an easy object-based model to access a computer’s file system. You simply have to create an instance of FileSystemObject in VBA and then you can generate files, read files, delete files, iterate through folders, and do many other operations on your computer’s file system.The FileSystemObject is present … [Read more...]

VBA InputBox – How to Use

In an earlier post, we have talked about MsgBox which is exactly opposite to VBA InputBox. The job of the InputBox function in VBA is to get some input from the user. It displays a dialog to the user that gives him a cue of which value should be entered, then it returns this value to the program.Syntax of InputBox in VBAIts syntax is as … [Read more...]

VBA Select Case Statement – Explained

In our previous posts, we have talked about Excel If Statement and Excel Nested If’s, and in today’s post we will discuss VBA select case statement. VBA Select Case can be used instead of complex Excel Nested If statements. This makes the VBA code faster to execute and easier to understand.Select-Case statement (also called as Switch Case in … [Read more...]

Excel Relative and Absolute References – Explained

In our last post about Finding duplicates in Excel, we created a clever formula to find only single instance of a duplicate value using the concept of Excel absolute references. In that post, we were unable to discuss further Absolute and Relative references, but today we will understand what these references mean.Excel Relative … [Read more...]

VBA InStr and InStrRev – How to Use

As the name suggests VBA InStr function looks for a substring embedded inside another string and then returns its starting position.  If it cannot find the string inside the parent string then it returns 0. It is a very important function among the string functions in VBA. It is probably the best function to perform string search … [Read more...]