Category Archives: Select Case VBA

What is a Select Case statement in VBA?

A Select Case in VBA is a conditional check function.
In my opinion, it is a bit easier to read than the If statement.

It controls program flow based on the condition of a variable

In the following example I am using the Select Case to evaluate the price of a certain security.

The “PriceDecision” function returns the result based on the price value passed to it.

Here are some screenshots (and these values are just sammples!)

The result of the custom function is in column “C” the “Decision” column.

Watch me do it:

Let me know if you have any questions.