Integers are whole numbers such as 5,000, 460, 39, 2, or 1.
Negative numbers and zero are also integers. Therefore, -5,876, -467, -34, -2, and 0 are also integers.
Integers do not have a fraction or decimal portion so 75.6, 0.897. and - 3.2 are not integers.
Integers in Calculations
If two integers are added, subtracted, or multiplied together, the answer will always be an integer such as:
- 2 + 6 = 8
10 - 25 = - 15
37 * 3 = 111
When one integer is divided by another integer, however, the result may or may not be an integer.
- 6 / 2 = 3
100 / 4 = 25
the above calculations have integers for results
6 / 4 = 1.5
99 / 4 = 24.75
the above calculations have decimal numbers for results
Integer use in Spreadsheets
Integers in Excel Functions
In Excel, integers can be created by rounding numbers with decimals.
Integers in Macros
Spreadsheet macros allow you to automate repetitive or complex operations.
Excel has a built in macro programming language and a common use for integers is to increase or decrease numbers one value at a time in operations that repeat over and over such as "for" and "while" loops.