Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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
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 rows [email protected] Excel Worksheet Functions 7 May 2nd 07 07:59 PM
Sorting Rows Steve F Excel Discussion (Misc queries) 5 October 6th 06 02:54 AM
Sorting Rows Quick Orange Excel Worksheet Functions 1 August 6th 06 03:55 PM
Sorting rows Mario Excel Worksheet Functions 3 July 13th 06 06:51 PM
sorting rows loleq Excel Worksheet Functions 1 May 30th 06 11:15 AM


All times are GMT +1. The time now is 11:00 AM.

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"