Round if last decimal number is less than

This tutorial shows how to round if the last decimal number is less than a specific number using an Excel formula, with the IF, VALUE, RIGHT, TEXT, TRUNC and ROUND functions

EXCEL FORMULA 1. Round if last decimal number is less than specific value

EXCEL

Hard coded formula
Round if last decimal number is less than
Cell reference formula
Round if last decimal number is less than
=IF(VALUE(RIGHT(TEXT(5.43-TRUNC(5.43),"General"),1))<4,ROUND(5.43,0),5.43)
=IF(VALUE(RIGHT(TEXT(B7-TRUNC(B7),"General"),1))<$C$4,ROUND(B7,0),B7)
GENERIC FORMULA

=IF(VALUE(RIGHT(TEXT(value-TRUNC(value),"General"),1))<less_value,ROUND(value,0),value)

ARGUMENTS
value: The value that you want to round if the last decimal number is less than a specific number.
less_value: The value that the number is less than.

GENERIC FORMULA

=IF(VALUE(RIGHT(TEXT(value-TRUNC(value),"General"),1))<less_value,ROUND(value,0),value)

ARGUMENTS
value: The value that you want to round if the last decimal number is less than a specific number.
less_value: The value that the number is less than.

EXPLANATION

This formula uses the TRUNC function to return the truncated number of the number that is being tested. It then subtracts that number from the exact number that is being tested to return the decimal value of the number that is to be rounded. The TEXT function is then used to convert the derived number into a text value with the text format of "General". The RIGHT function, with the number of characters set to 1, then returns the last value from the converted decimal number. The VALUE function then converts the text value into a number value. Finally, the IF function then tests if the derived number, which represents the last decimal number, is less than the specific value. If the test is TRUE, meaning that it is less than the specific number, the formula will round the entire number using the ROUND function, alternatively it will return the exact number that is being tested, without rounding it.

Click on either the Hard Coded or Cell Reference button to view the formula that has the less than decimal value and the number that is being tested directly entered into the formula or referenced to specific cells.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to round if last decimal number is greater than a specific number
How to round if a decimal number ends with a specific number

RELATED FUNCTIONS

Related Functions Description Related Functions and Description
The Excel IF function performs a test on specified conditions entered into the formula and returns a specified value if the result is TRUE or another specified value if the result is FALSE
The Excel VALUE function converts a text string that comprises numbers into a numeric value
The Excel RIGHT function returns the specified number of characters from a specified string, starting from the right side
The Excel TEXT function returns a numeric value as text, in a specified format
The Excel ROUND function returns a rounded number in accordance with the specified number of digits