Hi,
Does excel have a possibility to interlace data in stead of sorting them the conventional way?
I mean like this;
Suppose you have data
A
B
B
A
If you sort them, they become:
A
A
B
B
but what I want is:
A
B
A
B
Any Solutions?
Hi,
Does excel have a possibility to interlace data in stead of sorting them the conventional way?
I mean like this;
Suppose you have data
A
B
B
A
If you sort them, they become:
A
A
B
B
but what I want is:
A
B
A
B
Any Solutions?
I am not sure where this is going but, for this particular example try this formula
in B1 and copy it down
=INDEX($G$1:$G$6,MOD(ROWS($A$1:A1)-1,2)+1)
A B 1A A 2B B 3B A 4A B
Last edited by AlKey; 09-04-2014 at 09:42 AM.
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
I would be tempted to add a helper column that counts the number of A's and B's above that row. Something like =COUNTIF($A$1:A1,A1) [note the mix of relative and absolute referencing to control the input range.] http://office.microsoft.com/en-us/ex...077.aspx?CTT=1
Then a two key or two level sort where the first key is this helper column (increasing from 1 to whatever) and the 2nd key is column A (the column containing the A's and B's).
Originally Posted by shg
Something like this could work. It is a modification of MrShorty's solution
In column B enter this formula and copy down then select all the data and do 1 sort on column B:
Formula:Please Login or Register to view this content.
Result:
A B C 1a 1a =COUNTIF($A$1:A1,A1)&A1 2b 1b 3a 2a 4b 2b 5a 3a 6b 3b 7a 4a 8b 4b 9a 5a 10b 5b
<---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.Ron W
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks