One way which might work ..
Assume your data-set is in Sheet1, cols A and B
from row1 down
Also, col A is assumed to contain the "master" data list
i.e. the full data range of all the unique x's: x1, x2, x3, x4, etc
In a new Sheet2
----------------------
Put in A1: =Sheet1!A1
Put in B1:
=IF(ISNA(MATCH($A1,Sheet1!B:B,0)),"",OFFSET(Sheet1!$A$1,MATCH($A1,Sheet1!B:B
,0)-1,COLUMN()-1))
Select A1:B1
Copy down as many rows as there is data in Sheet1's col A
Col B will be "re-arranged" to the desired results
If there are other columns containing data
to be similarly re-arranged as was done for col B,
for example: in cols C, D, E, F, etc,
just copy the formula in col B across
(copy B1 across to say, F1, then copy down)
--
Rgds
Max
xl 97
---
Please respond, in newsgroup
xdemechanik <at>yahoo<dot>com
----
Salah said:
See below example and advise how can I sort the dataset (excel
spreadsheet) to show gaps as shown below.