VBA comes with many built-in functions for receiving user input, handling mathematical calculations, string manipulation, dates and time, and more. Learn about them here.
More VBA functions can be found here.
To test against tolerance values, it is common to use the Abs() function on the remainder of two Double values, and then compare that result to the tolerance. For example:
Dim dblVal1 as Double
Dim dblVal2 as Double
Dim dblTolerance as double
dblVal1 = 48.39
dblVal2 = 48.41
dblTolerance = 0.01
If Abs(dblVal1 - dblVal2) > dblTolerance Then MsgBox "Tolerance exceeded"
Lesson 1.6 – data conversion functions
Lesson 1.6 – date and time functions
Lesson 1.6 – InputBox function
Lesson 1.6 – MsgBox function
Lesson 1.6 – replace function
Lesson 1.6 – split function
Lesson 1.6 – string functions