Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Himu
 
Posts: n/a
Default Arranging columns

Suppose my excel sheet looks like this:
A
1 10
2 9
3 8
4 7
5 6
6 5
7 4
8 3
9 2
10 1

Now in B1 i want A10A9A8A7A6, i.e. 12345 then in B2 i want A5A4A3A2A1,
i.e.678910.

This is a simplified version of my problem. I have a column of 1000 numbers:
- i want to take the first 5 numbers and arrange them in reverse order,
- keep doing this for all the 1000 numbers in the column.

How can i do this without manually performing the work?
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5) &
INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5-1) &
INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5-2) &
INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5-3) &
INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5-4)

Copy down as far as required.

In article ,
"Himu" wrote:

Suppose my excel sheet looks like this:
A
1 10
2 9
3 8
4 7
5 6
6 5
7 4
8 3
9 2
10 1

Now in B1 i want A10A9A8A7A6, i.e. 12345 then in B2 i want A5A4A3A2A1,
i.e.678910.

This is a simplified version of my problem. I have a column of 1000 numbers:
- i want to take the first 5 numbers and arrange them in reverse order,
- keep doing this for all the 1000 numbers in the column.

How can i do this without manually performing the work?

  #3   Report Post  
Himu
 
Posts: n/a
Default

Could you explain how I can implement this foermula. I tried to paste the
formula you provided me below, but excel gives me error. Can you tell me what
should be inside ROW(??)

thankx

"JE McGimpsey" wrote:

One way:

=INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5) &
INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5-1) &
INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5-2) &
INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5-3) &
INDEX(A:A,COUNTA(A:A)-(ROW()-1)*5-4)

Copy down as far as required.

In article ,
"Himu" wrote:

Suppose my excel sheet looks like this:
A
1 10
2 9
3 8
4 7
5 6
6 5
7 4
8 3
9 2
10 1

Now in B1 i want A10A9A8A7A6, i.e. 12345 then in B2 i want A5A4A3A2A1,
i.e.678910.

This is a simplified version of my problem. I have a column of 1000 numbers:
- i want to take the first 5 numbers and arrange them in reverse order,
- keep doing this for all the 1000 numbers in the column.

How can i do this without manually performing the work?


  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Nothing goes inside ROW(), although it wouldn't hurt to put a reference
to any cell in the row that the formula resides in. Given your sample
data, the formula works as is.

What error are you getting?


In article ,
"Himu" wrote:

Could you explain how I can implement this foermula. I tried to paste the
formula you provided me below, but excel gives me error. Can you tell me what
should be inside ROW(??)

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
Columns FemIce Excel Discussion (Misc queries) 1 September 28th 05 09:29 AM
Arithmetical Mode of Criteria in Multiple Non-Adjacent columns Sam via OfficeKB.com Excel Worksheet Functions 4 July 14th 05 09:15 PM
Hidden Columns in Shared Workbooks Rotary Excel Discussion (Misc queries) 1 July 9th 05 12:28 AM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM
Columns in Excel will not allow user to click in them Kim Excel Discussion (Misc queries) 1 December 28th 04 06:37 PM


All times are GMT +1. The time now is 07:44 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"