Saturday, March 07, 2020

INT Function in Excel with Example


INT ()

This function rounds a number down to the nearest whole number.

Best view in desktop mode.


A
B
C
D
1
Number
Integer


2
1.5
1
=INT(C4)

3
2.3
2
=INT(C5)

4
10.75
10
=INT(C6)

5
-1.47589
-2
=INT(C7)

6






Syntax

=INT(Number)


Formatting

No special formatting is needed.



Example

The following table was used by a school to calculate the age a child when the school year started.
A child can only be admitted to school if they are over 8 years old.
The Birth Date and the Term Start date are entered and the age calculated.

Table 1 shows the age of the child with decimal places.

A
B
C
D
E
1
Table 1




2
Birth Date
Term Start
Age


3
5-Feb-11
1-Mar-20
9.067761807
=(B3-A3)/365.25
4
12-Jan-13
1-Mar-20
7.1321013


5
20-Oct-14
1-Mar-20
5.363449692


6
1-Aug-12
1-Mar-20
7.58110883


7






Table 2 shows the age of the child with the Age formatted with no decimal places. This has the effect of increasing the child age.

A
B
C
D
E
8
Table 2




9
Birth Date
Term Start
Age


10
5-Feb-11
1-Mar-20
9
=(B10-A10)/365.25
11
12-Jan-13
1-Mar-20
7


12
20-Oct-14
1-Mar-20
5


13
1-Aug-12
1-Mar-20
8


14






Table 3 shows the age of the child with the Age calculated using the =INT() function to remove the decimal part of the number to give the correct age.

A
B
C
D
E
15
Table 3




16
Birth Date
Term Start
Age


17
5-Feb-11
1-Mar-20
9
=INT((B17-A17)/365.25)
18
12-Jan-13
1-Mar-20
7


19
20-Oct-14
1-Mar-20
5


20
1-Aug-12
1-Mar-20
7


21






Please Note

The age is calculated by subtracting the Birth Date from the Term Start to find the age of the child in days.
The number of days is then divided by 365.25
The reason for using 365.25 is to take account of the leap years.

 



                       




No comments:

Post a Comment