Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Oct 2003
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shifting Data (XL 03)

    I have a system generated report that I have imported into XL. This report has part numbers with data found on 2 different rows that I would liked move to one single row with specific headings, so that I can filter and pivot if need be.

    Attached is the file, you will see Columns J, K, and L are color coded to their respective information on row 5. Basically I need D5 to move to J4, F5 to K4, and I5 to L4.

    I will then delete the blank lines and have a workable data set in which to manipulate. Is there an easy way to do this, as I have only attached a file showing 54 lines of this 3000 line report.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shifting Data (XL 03)

    See if this will do what you want:

    <code>
    Public Sub MoveToOneLine()
    Dim I As Long
    For I = Range("A65536").End(xlUp).Row - 1 To 3 Step -2
    Range("J1").Offset(I, 0).Value = Range("D1").Offset(I + 1, 0).Value
    Range("K1").Offset(I, 0).Value = Range("F1").Offset(I + 1, 0).Value
    Range("L1").Offset(I, 0).Value = Range("I1").Offset(I + 1, 0).Value
    Range("A1").Offset(I + 1, 0).EntireRow.Delete
    Next I
    End Sub
    </code>
    Legare Coleman

  3. #3
    Lounger
    Join Date
    Oct 2003
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shifting Data (XL 03)

    Legare,

    Thank you very much, this has saved me a ton of time and has given me a more reason to crunch more numbers.

    Thanks a Million

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •