Excel » VBA » Statements »

How to use the SET statement

The SET statement allows you to save an object reference to a variable, the image above demonstrates a macro that […]

How to use the GOTO statement [VBA]

The image above demonstrates the GoTo statement. It "jumps" or "navigates" to another place in the code, in this case, "Start". […]

How to use the WITH … END WITH statement

The With ... End With statement allows you to write shorter code by referring to an object only once instead […]

How to use the DO LOOP statement

The Do Loop statement allows you to repeat specific code until a condition is met. There are two possible ways […]

How to use SELECT CASE statement

The SELECT CASE statement allows you to compare an expression to multiple values. It is similar to the IF THEN ELSE […]

How to use the FOR NEXT statement

Table of Contents FOR NEXT statement FOR NEXT with a counter variable FOR each NEXT example FOR NEXT with counter […]

How to use the IF THEN ELSE ELSEIF END IF statement [VBA]

This article demonstrates how to use the If ... Then statement in Visual Basic for Applications (VBA). You can combine […]

Extract cell references from a formula

This article demonstrates a User Defined Function that allows you to extract cell references from a formula in a given […]

Resize a range of values (UDF)

The User Defined Function (UDF) demonstrated in this article, resizes a given range to columns or rows you specify. This […]

Find the most/least consecutive repeated value [VBA]

This post Find the longest/smallest consecutive sequence of a value has a few really big array formulas. Today I would like to […]

How to create a list of comments from a worksheet programmatically

Did you know that you can select all cells containing comments in the current sheet? Press F5, press with left […]

How to highlight row of the selected cell programmatically

Today I would like to share with you these small event handler procedures that make it easier for you to […]

Finding the shortest path – A * pathfinding

Two months ago I posted some interesting stuff I found: Shortest path. Let me explain, someone created a workbook that calculated […]

Customize Excel maze

Terry wants to make a different sized maze and I think that is a great idea. Perhaps you remember that I […]

Show / hide a picture using a button

This article explains how to hide a specific image in Excel using a shape as a button. If the user […]

Run a Macro from a Drop Down list [VBA]

This article demonstrates how to run a VBA macro using a Drop Down list. The Drop Down list contains two […]

Excel calendar [VBA]

This workbook contains two worksheets, one worksheet shows a calendar and the other worksheet is used to store events. The […]

Create links to all sheets in a workbook programmatically

The macro demonstrated above creates hyperlinks to all worksheets in the current worksheet.  You will then be able to quickly […]

Combine cell ranges ignore blank cells

The image above demonstrates a user defined function that merges up to 255 cell ranges and removes blanks. I will also […]