Excel » VBA » Statements »

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

The picture above demonstrates a FOR NEXT statement that goes through each cell value in cell range B3:B8 and adds it to […]

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

The picture above demonstrates an IF statement that checks if the value in B3 is smaller than the value in […]

Extract cell references from a formula

I am trying to build a regular expression that matches cell references in a formula. A regular expression is a […]

Resize a range of values

The user defined function demonstrated in the animated ggif below, resizes a range you specify to columns or rows you also […]

Find the longest/smallest consecutive sequence of a 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 show […]

List comments [VBA]

Did you know that you can select all comments in the current sheet? Press F5, click "Special..." button, select "Comments" […]

Highlight row and column of selected cell

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 and hide a picture [VBA]

Have you ever seen dashboards where you can click a shape and a picture shows up. If you click it […]

Run a Macro from a Drop Down list [VBA]

This article demonstrates how to execute a VBA macro using a drop down list. The drop down list contains multiple […]

Excel calendar [VBA]

This calendar lets you schedule events on the data sheet. Select a cell (calendar date) and events on that day […]

Create links to all sheets in a workbook

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

Combine cell ranges eliminating blanks

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