Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Working with Numbers and Integers | Basic Functions
Google Spreadsheets
course content

Conteúdo do Curso

Google Spreadsheets

Google Spreadsheets

1. Introduction to Google Sheets
2. Formatting of Cells and Ranges
3. Advanced Formatting of Cells
4. Sorting, Filtering and Cleaning Data
5. Creating Charts
6. Basic Functions
7. Logical Functions
8. Collaboration and Security

book
Working with Numbers and Integers

Will explore the topic of Working with Numbers and Integers. Functions for working with numbers and integers allow you to round numbers to whole values, find remainders, and calculate absolute values. Let’s look at three key functions: INT, MOD, and ABS.

Extracting Integers

The INT function returns the integer part of a number by truncating decimal places. This function is useful when you need to round a number down to the nearest whole number, regardless of the decimal values.

Syntax and Examples

INT(value)

  • value - The value you want to round down to the nearest whole number.
FormulaResultComment
INT(5)5The integer part of the number is 5.
INT(5.3)5Rounds down to the nearest whole number, 5.
INT(5.8)5Rounds down even when the decimal part is > 0.5.
INT(5.88)5Truncates to 5 regardless of the decimal size.
INT(-5.8)-6For negative numbers, always rounds down further.
INT(-5.3)-6Always rounds down further for negatives.

Calculating Modulus

The MOD function returns the remainder when one number is divided by another. This is useful for determining remainders, identifying even and odd numbers, and solving problems involving cyclic calculations.

Syntax and Examples

MOD(dividend, divisor)

  • dividend - The number to divide to find the remainder;
  • divisor - The number to divide by.
FormulaResultComment
MOD(5,5)0Remainder when dividing 5 by 5 is 0, as 5 is divisible by 5.
MOD(7,5)2Dividing 7 by 5 gives 1 with a remainder of 2.
MOD(3,5)33 is less than 5, so the result is the number itself, 3.
MOD(0,5)0Dividing 0 by any number always yields a remainder of 0.
MOD(5,0)#DIV/0!Error #DIV/0! occurs because division by 0 is undefined.
MOD(-3,5)2The remainder of -3 divided by 5 is 2; the result is always non-negative.
MOD(5,-3)-1Dividing 5 by -3 yields a remainder of -1; the result can be negative.
IF(MOD(5,2) = 0, "Even", "Odd")OddMOD(5,2) calculates a remainder of 1, so the result is "Odd".

Calculating Absolute Values

The ABS function returns the absolute value of a number, i.e., the number without its sign. This is useful for converting negative numbers to positive in calculations where only the magnitude matters.

Syntax and Examples

ABS(value)

  • value - The number for which you want to return the absolute value.
FormulaResultComment
ABS(-10)10Returns the absolute value of the number.
ABS(-10.643)10.643Removes the negative sign; result is 10.643.
ABS(-10/4)2.5Dividing -10 by 4 gives -2.5; the absolute value is 2.5.
ABS(10)10Positive numbers remain unchanged.

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 6. Capítulo 5
We're sorry to hear that something went wrong. What happened?
some-alt