Is excel capable of gouping numbers within 1 of each other

  • Thread starter Thread starter beat
  • Start date Start date
B

beat

I am trying to pick numbers out pf cells that are within 1 of each other, eg
4,5,7,9,1,11. I want 4,5 to go together.
 
beat said:
I am trying to pick numbers out pf cells that are within 1 of each other, eg
4,5,7,9,1,11. I want 4,5 to go together

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

---
 
Back
Top