#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Sorting

i have around 20 sheets each one has a following data
A B C D E F
1 5 6 7 8 9 abc
2 6 5 8 8 9 def
3 8 7 9 2 1 ghi
4 7 7 6 6 5 jkl
5 5 4 1 1 1 mno

i like the result to be converted as follows

abc 5
abc 6
abc 7
abc 8
abc 9
def 6
def 5
def 8
def 8
def 9
and so on

Regards


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default Sorting

This works according to my read of your situation. It puts the transformed
data in column G. Assumed is that your data starts in A1 and ranges A to F
and down an indefinite number of rows. Change to suit. After creating the new
data you can confirm that it's OK and delete the original. Then paste it in
its place.

Test it rigorously on experimental data. Written and tested in 10 minutes!!!

Sub TransformData()
Dim r As Range
Dim i As Long, ii As Long, x As Long
Set r = Range(Range("A1"), Range("A1").End(xlDown))
For i = 1 To r.Count
For ii = 1 To 5
x = x + 1
r(x, 7).Value = r(i, 6) & r(i, ii).Value
Next
Next
End Sub

Greg

"osaka78" wrote:

i have around 20 sheets each one has a following data
A B C D E F
1 5 6 7 8 9 abc
2 6 5 8 8 9 def
3 8 7 9 2 1 ghi
4 7 7 6 6 5 jkl
5 5 4 1 1 1 mno

i like the result to be converted as follows

abc 5
abc 6
abc 7
abc 8
abc 9
def 6
def 5
def 8
def 8
def 9
and so on

Regards


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default Sorting

Or use Pivot Table.
No formulas or VBA needed.
You can convert 20 sheets with
odd sized tables at odd locations
into one list.
http://www.freefilehosting.net/download/3b5gk
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 VLookup vs Sorting SumProduct Lauren Excel Discussion (Misc queries) 1 August 21st 07 12:19 AM
Sorting: Sorting by the First Character dzuy Excel Discussion (Misc queries) 2 June 22nd 06 08:27 PM
Sorting MAB Excel Worksheet Functions 4 January 30th 06 03:24 PM
Sorting Tom Excel Worksheet Functions 3 January 27th 06 11:49 PM
sorting jsb1107 Excel Discussion (Misc queries) 3 January 22nd 06 03:48 AM


All times are GMT +1. The time now is 12:13 PM.

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

About Us

"It's about Microsoft Excel"