Just a little tinker (longshot) to scratch it here
Assuming numbers posted are in A1:F1 (in individual cells)
and that only numbers adjacent to each other are to be compared
In A2, copied across to F2:
=IF(B1="","",IF(ABS(B1-A1)=1,A1&","&B1,""))
might just give you returns resembling what you seem to want