ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is excel capable of gouping numbers within 1 of each other (https://www.excelbanter.com/excel-worksheet-functions/179879-excel-capable-gouping-numbers-within-1-each-other.html)

beat

Is excel capable of gouping numbers within 1 of each other
 
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.

Max

Is excel capable of gouping numbers within 1 of each other
 
"beat" wrote:
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
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


All times are GMT +1. The time now is 10:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com