Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a spreadsheet that I need to do some sorting where the information for
each person is on 2 lines. I need to keep the grouped info together. Also, when I imported this data, it had put to sections together that should have been seperated. When I do this sort, I would have to eliminate the first 6 spaces. Any help would be greatful. Thanks. Here is an example of what is in each row: Row 1: 73.26 0829. DAWSON,ANGELA K D 508347 3 62 4100557000048 070106 073106 167.20 167.20 0.00 0.00 167.20 Row 2: PROC CO DE - MODIFIER T2002 - U3 070106 073106 167.20 167.20 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
In order to use the sort function the data have to be on the same row.
-- Brevity is the soul of wit. "justlearnin" wrote: I have a spreadsheet that I need to do some sorting where the information for each person is on 2 lines. I need to keep the grouped info together. Also, when I imported this data, it had put to sections together that should have been seperated. When I do this sort, I would have to eliminate the first 6 spaces. Any help would be greatful. Thanks. Here is an example of what is in each row: Row 1: 73.26 0829. DAWSON,ANGELA K D 508347 3 62 4100557000048 070106 073106 167.20 167.20 0.00 0.00 167.20 Row 2: PROC CO DE - MODIFIER T2002 - U3 070106 073106 167.20 167.20 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
What about using a macro?
"Dave F" wrote: In order to use the sort function the data have to be on the same row. -- Brevity is the soul of wit. "justlearnin" wrote: I have a spreadsheet that I need to do some sorting where the information for each person is on 2 lines. I need to keep the grouped info together. Also, when I imported this data, it had put to sections together that should have been seperated. When I do this sort, I would have to eliminate the first 6 spaces. Any help would be greatful. Thanks. Here is an example of what is in each row: Row 1: 73.26 0829. DAWSON,ANGELA K D 508347 3 62 4100557000048 070106 073106 167.20 167.20 0.00 0.00 167.20 Row 2: PROC CO DE - MODIFIER T2002 - U3 070106 073106 167.20 167.20 |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Maybe you can add two additional columns and sort by those.
The first column would contain the common key for that logical pair of rows. the second column would just be 1, 2, 1, 2, 1, 2... (just an indicator which row is which row). Alternatively, you could put all your data on one row, and sort that. justlearnin wrote: I have a spreadsheet that I need to do some sorting where the information for each person is on 2 lines. I need to keep the grouped info together. Also, when I imported this data, it had put to sections together that should have been seperated. When I do this sort, I would have to eliminate the first 6 spaces. Any help would be greatful. Thanks. Here is an example of what is in each row: Row 1: 73.26 0829. DAWSON,ANGELA K D 508347 3 62 4100557000048 070106 073106 167.20 167.20 0.00 0.00 167.20 Row 2: PROC CO DE - MODIFIER T2002 - U3 070106 073106 167.20 167.20 -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
The only problem with all on one row is that there is over 3000 rows of info.
Is there a way to join the two rows when it is imported? "Dave Peterson" wrote: Maybe you can add two additional columns and sort by those. The first column would contain the common key for that logical pair of rows. the second column would just be 1, 2, 1, 2, 1, 2... (just an indicator which row is which row). Alternatively, you could put all your data on one row, and sort that. justlearnin wrote: I have a spreadsheet that I need to do some sorting where the information for each person is on 2 lines. I need to keep the grouped info together. Also, when I imported this data, it had put to sections together that should have been seperated. When I do this sort, I would have to eliminate the first 6 spaces. Any help would be greatful. Thanks. Here is an example of what is in each row: Row 1: 73.26 0829. DAWSON,ANGELA K D 508347 3 62 4100557000048 070106 073106 167.20 167.20 0.00 0.00 167.20 Row 2: PROC CO DE - MODIFIER T2002 - U3 070106 073106 167.20 167.20 -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Maybe you could run a macro that takes the even numbered rows and moves them to
the far right--then deletes the even numbered row. This is kind of specific and you'll have to modify it. Option Explicit Sub testme() Dim iRow As Long With ActiveSheet 'starts on an even row For iRow = .Cells(.Rows.Count, "A").End(xlUp).Row To 1 Step -2 .Cells(iRow, "A").Resize(1, 10).Cut _ Destination:=.Cells(iRow - 1, "Z") .Rows(iRow).Delete Next iRow End With End Sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm It copies columns A:J using this portion: ..Cells(iRow, "A").Resize(1, 10).Cut (Starting in A, but make the range 1 row by 10 columns.) Adjust it to match your data. And then it pastes in the previous row starting in column Z. Destination:=.Cells(iRow - 1, "Z") You'll have to change this, too. Test it against a copy of your worksheet--it'll destroy it if it's wrong! justlearnin wrote: The only problem with all on one row is that there is over 3000 rows of info. Is there a way to join the two rows when it is imported? "Dave Peterson" wrote: Maybe you can add two additional columns and sort by those. The first column would contain the common key for that logical pair of rows. the second column would just be 1, 2, 1, 2, 1, 2... (just an indicator which row is which row). Alternatively, you could put all your data on one row, and sort that. justlearnin wrote: I have a spreadsheet that I need to do some sorting where the information for each person is on 2 lines. I need to keep the grouped info together. Also, when I imported this data, it had put to sections together that should have been seperated. When I do this sort, I would have to eliminate the first 6 spaces. Any help would be greatful. Thanks. Here is an example of what is in each row: Row 1: 73.26 0829. DAWSON,ANGELA K D 508347 3 62 4100557000048 070106 073106 167.20 167.20 0.00 0.00 167.20 Row 2: PROC CO DE - MODIFIER T2002 - U3 070106 073106 167.20 167.20 -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to keep adjacent rows linked when sorting with lists | New Users to Excel | |||
sorting rows based upon formatting | Excel Discussion (Misc queries) | |||
Counting Match Pairs In Rows | Excel Worksheet Functions | |||
identically size merged cells for sorting rows | Excel Discussion (Misc queries) | |||
sorting out columns but only for some rows | Excel Discussion (Misc queries) |