Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default About sorting and extracting data in one column

I have got a column of data like below:
B
B
A
A
A
B
A

how could I use the excel function to make it becomes the following?
B A B A
B A
A
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default About sorting and extracting data in one column

Use:

=A1 & " " & A3 & " " & A1 & " " & A3
=A2 & " " & A4
=" " & A3

--
Gary''s Student - gsnu200727


"Ting Li" wrote:

I have got a column of data like below:
B
B
A
A
A
B
A

how could I use the excel function to make it becomes the following?
B A B A
B A
A

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default About sorting and extracting data in one column

Thank you so much for your help.
But I want to show each of them in independent boxes like:
A B C D E F
1 B A B A
2 B A
3 A
4
5

Since my data base has more than 1000 entries, I am now looking for some
fast ways to change them into the pattern like above.


"Gary''s Student" wrote:

Use:

=A1 & " " & A3 & " " & A1 & " " & A3
=A2 & " " & A4
=" " & A3

--
Gary''s Student - gsnu200727


"Ting Li" wrote:

I have got a column of data like below:
B
B
A
A
A
B
A

how could I use the excel function to make it becomes the following?
B A B A
B A
A

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default About sorting and extracting data in one column

Assume your data is in A1:A19. Assume you start your cross-tabulation
in D1. Before this, use an aux column, in B:B, with the follwoing: In
B1 enter 1. Then in B2:
=IF(A2=A1,B1,B1+1)

Now, in D1, enter the following *array* formula (commit with Shift+Ctrl
+Enter)

=IF(ISERROR(SMALL(IF($B$1:$B$19=COLUMNS($D$1:D1),R OW($A$1:$A$19)-ROW($A
$1)+1),ROW()-ROW(D$1)+1)),"",INDEX($A$1:$A$19,SMALL(IF($B$1:$B
$19=COLUMNS($D$1:D1),ROW($A$1:$A$19)-ROW($A$1)+1),ROW()-ROW(D$1)+1)))

Copy to the right and down as far as necessary.

HTH
Kostis Vezerides


On Jun 7, 10:28 am, Ting Li wrote:
Thank you so much for your help.
But I want to show each of them in independent boxes like:
A B C D E F
1 B A B A
2 B A
3 A
4
5

Since my data base has more than 1000 entries, I am now looking for some
fast ways to change them into the pattern like above.

"Gary''s Student" wrote:
Use:


=A1 & " " & A3 & " " & A1 & " " & A3
=A2 & " " & A4
=" " & A3


--
Gary''s Student - gsnu200727


"Ting Li" wrote:


I have got a column of data like below:
B
B
A
A
A
B
A


how could I use the excel function to make it becomes the following?
B A B A
B A
A



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default About sorting and extracting data in one column

Thanks for your repy!!!

But when I copy the formula to the cell D1, it showed an error message and
said maybe the formula error.

Also, the situation now becomes:
B
B
B
C
A
A
B
A
C

Is that possible for me to use similar functions for tabulation?



"vezerid" wrote:

Assume your data is in A1:A19. Assume you start your cross-tabulation
in D1. Before this, use an aux column, in B:B, with the follwoing: In
B1 enter 1. Then in B2:
=IF(A2=A1,B1,B1+1)

Now, in D1, enter the following *array* formula (commit with Shift+Ctrl
+Enter)

=IF(ISERROR(SMALL(IF($B$1:$B$19=COLUMNS($D$1:D1),R OW($A$1:$A$19)-ROW($A
$1)+1),ROW()-ROW(D$1)+1)),"",INDEX($A$1:$A$19,SMALL(IF($B$1:$B
$19=COLUMNS($D$1:D1),ROW($A$1:$A$19)-ROW($A$1)+1),ROW()-ROW(D$1)+1)))

Copy to the right and down as far as necessary.

HTH
Kostis Vezerides


On Jun 7, 10:28 am, Ting Li wrote:
Thank you so much for your help.
But I want to show each of them in independent boxes like:
A B C D E F
1 B A B A
2 B A
3 A
4
5

Since my data base has more than 1000 entries, I am now looking for some
fast ways to change them into the pattern like above.

"Gary''s Student" wrote:
Use:


=A1 & " " & A3 & " " & A1 & " " & A3
=A2 & " " & A4
=" " & A3


--
Gary''s Student - gsnu200727


"Ting Li" wrote:


I have got a column of data like below:
B
B
A
A
A
B
A


how could I use the excel function to make it becomes the following?
B A B A
B A
A






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default About sorting and extracting data in one column

About the situation I just mentioned, C won't come up with a new column and
it stays at the column same as the previous result:

B A B C
D
B 1 B A B A
B 2 B A
C
C 3 B
C ---4 C
A 5 C
A
B
A
C

Please help~ m(_ _)m



"Ting Li" wrote:

Thanks for your repy!!!

But when I copy the formula to the cell D1, it showed an error message and
said maybe the formula error.

Also, the situation now becomes:
B
B
B
C
A
A
B
A
C

Is that possible for me to use similar functions for tabulation?



"vezerid" wrote:

Assume your data is in A1:A19. Assume you start your cross-tabulation
in D1. Before this, use an aux column, in B:B, with the follwoing: In
B1 enter 1. Then in B2:
=IF(A2=A1,B1,B1+1)

Now, in D1, enter the following *array* formula (commit with Shift+Ctrl
+Enter)

=IF(ISERROR(SMALL(IF($B$1:$B$19=COLUMNS($D$1:D1),R OW($A$1:$A$19)-ROW($A
$1)+1),ROW()-ROW(D$1)+1)),"",INDEX($A$1:$A$19,SMALL(IF($B$1:$B
$19=COLUMNS($D$1:D1),ROW($A$1:$A$19)-ROW($A$1)+1),ROW()-ROW(D$1)+1)))

Copy to the right and down as far as necessary.

HTH
Kostis Vezerides


On Jun 7, 10:28 am, Ting Li wrote:
Thank you so much for your help.
But I want to show each of them in independent boxes like:
A B C D E F
1 B A B A
2 B A
3 A
4
5

Since my data base has more than 1000 entries, I am now looking for some
fast ways to change them into the pattern like above.

"Gary''s Student" wrote:
Use:

=A1 & " " & A3 & " " & A1 & " " & A3
=A2 & " " & A4
=" " & A3

--
Gary''s Student - gsnu200727

"Ting Li" wrote:

I have got a column of data like below:
B
B
A
A
A
B
A

how could I use the excel function to make it becomes the following?
B A B A
B A
A




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default About sorting and extracting data in one column

Ting,

When building the formula I indeed provided more groups than just A
and B. This is the spirit of the aux column in B:B.

Are you starting your crosstab from D1? If not, wherever you see a D1
in the formula you have to change it to the cell from which you are
starting.

Post back with your current formula, copied/pasted exactly as you are
using it.

HTH
Kostis

On Jun 8, 10:02 am, Ting Li wrote:
About the situation I just mentioned, C won't come up with a new column and
it stays at the column same as the previous result:

B A B C
D
B 1 B A B A
B 2 B A
C
C 3 B
C ---4 C
A 5 C
A
B
A
C

Please help~ m(_ _)m

"Ting Li" wrote:
Thanks for your repy!!!


But when I copy the formula to the cell D1, it showed an error message and
said maybe the formula error.


Also, the situation now becomes:
B
B
B
C
A
A
B
A
C


Is that possible for me to use similar functions for tabulation?


"vezerid" wrote:


Assume your data is in A1:A19. Assume you start your cross-tabulation
in D1. Before this, use an aux column, in B:B, with the follwoing: In
B1 enter 1. Then in B2:
=IF(A2=A1,B1,B1+1)


Now, in D1, enter the following *array* formula (commit with Shift+Ctrl
+Enter)


=IF(ISERROR(SMALL(IF($B$1:$B$19=COLUMNS($D$1:D1),R OW($A$1:$A$19)-ROW($A
$1)+1),ROW()-ROW(D$1)+1)),"",INDEX($A$1:$A$19,SMALL(IF($B$1:$B
$19=COLUMNS($D$1:D1),ROW($A$1:$A$19)-ROW($A$1)+1),ROW()-ROW(D$1)+1)))


Copy to the right and down as far as necessary.


HTH
Kostis Vezerides


On Jun 7, 10:28 am, Ting Li wrote:
Thank you so much for your help.
But I want to show each of them in independent boxes like:
A B C D E F
1 B A B A
2 B A
3 A
4
5


Since my data base has more than 1000 entries, I am now looking for some
fast ways to change them into the pattern like above.


"Gary''s Student" wrote:
Use:


=A1 & " " & A3 & " " & A1 & " " & A3
=A2 & " " & A4
=" " & A3


--
Gary''s Student - gsnu200727


"Ting Li" wrote:


I have got a column of data like below:
B
B
A
A
A
B
A


how could I use the excel function to make it becomes the following?
B A B A
B A
A



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default About sorting and extracting data in one column

Kostis,

Yes. I did follow exactly what you told me to do.
=IF(ISERROR(SMALL(IF($B$1:$B$19=COLUMNS($D$1:D1),R OW($A$1:$A$19)-ROW($A
$1)+1),ROW()-ROW(D$1)+1)),"",INDEX($A$1:$A$19,SMALL(IF($B$1:$B
$19=COLUMNS($D$1:D1),ROW($A$1:$A$19)-ROW($A$1)+1),ROW()-ROW(D$1)+1)))

I copied this to the cell D1. I have also done the aux column at B:B and I
know it works as a tool that change pattern into numbers which would be
easier later to put them in columns.

Would you mind to email me the sample file?

"vezerid" wrote:

Ting,

When building the formula I indeed provided more groups than just A
and B. This is the spirit of the aux column in B:B.

Are you starting your crosstab from D1? If not, wherever you see a D1
in the formula you have to change it to the cell from which you are
starting.

Post back with your current formula, copied/pasted exactly as you are
using it.

HTH
Kostis

On Jun 8, 10:02 am, Ting Li wrote:
About the situation I just mentioned, C won't come up with a new column and
it stays at the column same as the previous result:

B A B C
D
B 1 B A B A
B 2 B A
C
C 3 B
C ---4 C
A 5 C
A
B
A
C

Please help~ m(_ _)m

"Ting Li" wrote:
Thanks for your repy!!!


But when I copy the formula to the cell D1, it showed an error message and
said maybe the formula error.


Also, the situation now becomes:
B
B
B
C
A
A
B
A
C


Is that possible for me to use similar functions for tabulation?


"vezerid" wrote:


Assume your data is in A1:A19. Assume you start your cross-tabulation
in D1. Before this, use an aux column, in B:B, with the follwoing: In
B1 enter 1. Then in B2:
=IF(A2=A1,B1,B1+1)


Now, in D1, enter the following *array* formula (commit with Shift+Ctrl
+Enter)


=IF(ISERROR(SMALL(IF($B$1:$B$19=COLUMNS($D$1:D1),R OW($A$1:$A$19)-ROW($A
$1)+1),ROW()-ROW(D$1)+1)),"",INDEX($A$1:$A$19,SMALL(IF($B$1:$B
$19=COLUMNS($D$1:D1),ROW($A$1:$A$19)-ROW($A$1)+1),ROW()-ROW(D$1)+1)))


Copy to the right and down as far as necessary.


HTH
Kostis Vezerides


On Jun 7, 10:28 am, Ting Li wrote:
Thank you so much for your help.
But I want to show each of them in independent boxes like:
A B C D E F
1 B A B A
2 B A
3 A
4
5


Since my data base has more than 1000 entries, I am now looking for some
fast ways to change them into the pattern like above.


"Gary''s Student" wrote:
Use:


=A1 & " " & A3 & " " & A1 & " " & A3
=A2 & " " & A4
=" " & A3


--
Gary''s Student - gsnu200727


"Ting Li" wrote:


I have got a column of data like below:
B
B
A
A
A
B
A


how could I use the excel function to make it becomes the following?
B A B A
B A
A




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting column data Matt T Excel Worksheet Functions 2 June 1st 07 02:34 PM
Sorting Data From One Column into Multiple Columns Justin Hoffmann Excel Worksheet Functions 2 July 12th 06 04:15 PM
Help sorting data into own column skint Excel Discussion (Misc queries) 1 April 7th 06 10:18 PM
Sorting Data in a column BigAndy Excel Discussion (Misc queries) 1 September 13th 05 10:05 AM
Linking sheets when sorting row and column data Sean 3DD Excel Worksheet Functions 0 January 5th 05 12:21 PM


All times are GMT +1. The time now is 02:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"