The domain approach above won’t give you exactly what you need. If you add for instance 12.1 in the list, it gets added to the third group although the distance to 7.2 is less than 5.
Unfortunately I don’t think such looping through values can be done without scripting.