User Defined Function

Find many more useful User Defined functions created by me here on this page.. Know more about Custom Functions in Excel using Excel VBA

Validate BurgerServiceNummer (BSN) using Excel VBA

Important Note: This post will make more sense to those who stays in Netherlands. But wait.. even if you do not stay in Netherlands, you will learn some interesting Algorithm!! BSN is short form of Dutch Word - BurgerServiceNummer . In English, this is called  Citizen Service Number. This is a unique Personal Identification Number assigned by Netherlands [...]

How to create User Defined Functions in Excel

U ser Defined functions (UDF) is also known as Custom Functions (formulas) in Excel. So far, I have created many different User Defined Functions for different purposes but never told you about How to create Custom Functions in Excel in a systematic way.. Therefore in this article I am going to teach you Step by step procedure to create your [...]

Check if file is already open using excel VBA

Dear LEM Readers,   While doing programming with VBA many a times it happens to open an existing file. Before opening that file, it is always a good idea to check if that file is already open or not. Therefore I have written a function (IsFileOpen()) which takes the complete path of that file (with file name) as an Input [...]

How to get Excel Range in Array

Many a times while doing coding in excel, we need all the values stored in a Cell Range in an Array format. So that during any point of time we can access the value from the array, rather going in Excel Cell and reading from there. Thinking that in mind, I just created a Function (UDF - User Defined Function) [...]

User Defined Function in Excel to Convert Currency to Words

Many a times we require to change the Numbers in Words. For Example: 6734862=Sixty Seven Lakhs Thirty Four Thousand Eight Hundred Sixty Two. In Excel, there is no Formula as such to Convert Numbers in Words. I have written one UDF : User Defined Function. After using this Function, you will be able to change any numbers in Words. Now [...]

How to get Word Count and Letter Count in Excel Formula

Dear Readers, Getting a word Count of a String kept in a Cell, is not so difficult but sometimes you just don't get it how to do it. So keeping that in mind, I wrote all possible ways to get Word Count of a String. You can get it by Excel Formula as well as UDF (User Defined Function). We [...]

Excel UDF: How to Get All words in Reverse Order from a String

I created this UDF (User defined Function) to help you in arranging all the Words of a String in Reverse Order. It will put the Words in a reverse Order. Letters of each words will remain in same (proper) order. If you want to reverse the whole String then refer this Article. Put the below code inside your Regular Module. [...]

Excel UDF: To exctract All Numbers, Special Characters and Alphabets from a String

Sometimes you require to Extract All Numbers and Characters from a mixed String. I have written a UDF (User Defined Function) to extract them. UDF Function to Extract Numbers from a String UDF Function to Extract Special Characters from a String UDF Function to Extract Alhpabets from a String Add the below Code in any of your Regular Module of [...]

Strip HTML : How to Remove HTML tags from a String in VBA

In this article I am going to write an User Defined Function (UDF) which is used to remove all HTMLs from a String Stored in Cell. It can be used as normal Inbuilt Formulas of Excel. For writing this function i have used VBScript Regular Expression to Replace all the HTML tags with BLANK "". In code you can see [...]

How to Extract Email ID from a String in Cell

If you want to extract email ID from a String Stored in any cell, it is possible by writing a Simple UDF (User Defined Function) in Excel. After writing this UDF, you can use this function as a normal Excel Function. Follow the below Steps: 1. Open Visual Basic Editor (Alt+ F11) 2. Open an Existing Module or add a [...]