IF Excel Formula

use ABS():

=IF(ABS(C3-D3)<=5,"OK","ERROR")