Return to VBA Code Examples

VBA Val Function

This tutorial will demonstrate how to use the Val VBA function.

Val Function

VBA Val Convert Expression to Number

The VBA Val function converts an expression to a number. Val function will return 0 if the first character is non-numerical. It ignores spaces and it will stop evaluating as soon as it finds a character that has no numerical meaning.


VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as

Learn More!