I'm trying to create a formula where if the resultant value of a cell return a value as follows

if 4=4
if <4 but greater than or equal to 3.5 = 3.5
if <3.5 but greater than or equal to 3 = 3
if <3 but greater than or equal to 2 = 2
if <2 =1

thanks