Intermediate Google Sheets
Richie Cotton
Data Evangelist at DataCamp
| A | B | C | |
|---|---|---|---|
| 1 | Value | Command | Result |
| 2 | 1234.5678 |
=ROUND(A2) |
1235 |
| 3 | =ROUND(A2, 2) |
1234.57 |
|
| 4 | =ROUND(A2, -2) |
1200 |
| A | B | C | |
|---|---|---|---|
| 1 | Value | Command | Result |
| 2 | 1234.5678 |
=CEILING(A2) |
1235 |
| 3 | =FLOOR(A2) |
1234 |
|
| 4 | -1234.5678 |
=CEILING(A4) |
-1234 |
| 5 | =FLOOR(A4) |
-1235 |
| A | B | C | |
|---|---|---|---|
| 1 | Value | Command | Result |
| 2 | 1234.5678 |
=CEILING(A2, 0.01) |
1234.57 |
| 3 | =FLOOR(A2, 0.01) |
1234.56 |
|
| 4 | =CEILING(A2, 100) |
-1300 |
|
| 5 | =FLOOR(A2, 100) |
-1200 |
ROUND(x, n) rounds x to the nearest n decimal places.CEILING(x, y) rounds x up to the nearest multiple of y.FLOOR(x, y) rounds x down to the nearest multiple of y.Intermediate Google Sheets