View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Niek Otten Niek Otten is offline
external usenet poster
 
Posts: 3,440
Default Can Excel "extract" ranges of numbers listed in the A column?

You said you wanted the UNknown ranges.

In B2:

=IF(A2-A1=1,"",A1&" - "&A2)

and fill down.

This formula has to be modified somewhat to report the known ranges, as in your example.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Quco" wrote in message ...
| Hi, I have a LOOOONNNG list of 5-digit numbers in a spreadsheet. They are all
| listed in the A column. We only need to report the unknown ranges for this
| numbers, not the actual numbers. How can I do that?
|
| Doing this manually after sorting the data is taking us forever.
|
| Here's an example, I cut and paste a super-small portion of the sorted data
| he
|
| 41222
| 41223
| 41224
| 41225
| 41226
| 41227
| 41762
| 41763
| 41764
| 41765
| 41766
| 41767
| 41768
| 41769
| 41770
| 41771
| 41772
| 41773
| 41774
| 41775
| 41776
| 41777
| 42302
| 42303
| 42304
| 42305
| 42306
| 42307
| 42308
| 42309
| 42310
| 42311
| 42312
| 42313
| 42314
| 42315
| 42316
| 42830
| 42831
| 42832
| 42833
| 42834
| 42835
| 42836
| 42837
| 42838
| 42839
| 42842
| 42843
| 42844
| 42845
| 42846
| 42847
| 42848
|
| And this is what we need:
|
| Range 1: 41222-41227
| Range 2: 41762-41777
| Range 3: 42302-42316
| Range 4: 42830-42848
| etc...
|
| Any suggestions?
|