Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sorting rows into a row
Afternoon from Sunny South Africa,
I have got a General Ledger download of a customers account. There are two row per transaction, which management now wants into one row. I was trying to use the following principle, if I sequenced the rows 1 to whatever, then copied the rows so that they lined up with each row, row sequence # 2 on the left and row sequence # 2 to its right. If I was then able to only select the odd numbered sequenced rows on the right then the information would make one long row. Question? How do I only sort even and odd numbers. Or do you have a simpler solution. Unfortunately the Dr and Cr side of the transaction does not have anything in common (i.e transaction number etc) with each other, so you cannot use vlookup. Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Sorting rows into a row
How many cells in each row range?
Knowing that would be a great deal of help in tailoring a solution. I will assume 6 columns used per row. Adjust the 6 and "G" for more columns per row. Try this macro on a copy of your worksheet. Sub Move_Sets() Dim iSource As Long Dim iTarget As Long iSource = 1 iTarget = 1 Do Cells(iSource, "A").Resize(1, 6).Cut _ Destination:=Cells(iTarget, "A") Cells(iSource + 1, "A").Resize(1, 6).Cut _ Destination:=Cells(iTarget, "G") iSource = iSource + 2 iTarget = iTarget + 1 Loop Until IsEmpty(Cells(iSource, "A").Value) End Sub Row 2 to G1:L1 Row 3 moves up and row 4 to G2:L2 Gord Dibben MS Excel MVP On Wed, 6 Feb 2008 03:47:02 -0800, Sunnyskies wrote: Afternoon from Sunny South Africa, I have got a General Ledger download of a customers account. There are two row per transaction, which management now wants into one row. I was trying to use the following principle, if I sequenced the rows 1 to whatever, then copied the rows so that they lined up with each row, row sequence # 2 on the left and row sequence # 2 to its right. If I was then able to only select the odd numbered sequenced rows on the right then the information would make one long row. Question? How do I only sort even and odd numbers. Or do you have a simpler solution. Unfortunately the Dr and Cr side of the transaction does not have anything in common (i.e transaction number etc) with each other, so you cannot use vlookup. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sorting rows | Excel Worksheet Functions | |||
Sorting Rows | Excel Discussion (Misc queries) | |||
Sorting Rows | Excel Worksheet Functions | |||
Sorting rows | Excel Worksheet Functions | |||
sorting rows | Excel Worksheet Functions |