• Share

Discuss in my forum

# Integer

Definition:

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.

For example:

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

In addition to allowing integer data to be stored in a worksheet cell, all spreadsheet programs make use of integers in cell references such as A1, D25, or SE4578.

### Integers in Excel Functions

In Excel, integers can be created by rounding numbers with decimals.

Two functions that will do this are the INT and TRUNC functions. Both of these functions completely remove the decimal portion of a number.

Integers are also required as arguments in certain functions such as WORKDAY.INTL and NETWORKDAYS.INTL and VLOOKUP.

### 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.

Ted French

By Category
2. Computing