From the course: Excel: Learning VBA

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Introduce Excel VBA data types

Introduce Excel VBA data types - Microsoft Excel Tutorial

From the course: Excel: Learning VBA

Introduce Excel VBA data types

- [Instructor] When you create programs using Excel VBA, you can define variables and assign each of those variables a type. In this movie, I will list and describe the variable types that are available to you. To start, we'll look at the byte data type, and that is a very small number that goes from zero to 255. So you have eight bits or zeros and ones and two to the eighth is 255. You can also have what's called a Boolean value and that can be true or false. True is represented as a one and false is represented as a zero. And integer is a number from negative 32,768 to positive 32,767. And those two numbers are different on the positive and negative side because you have to include zero. Integers are by far the trickiest data type to work with because you assume that most numbers can fit into an integer when in fact they can't. It only goes up to 32,767. So you can use integers, but make sure that your numbers…

Contents