Question : Need an Excel Macro to offset every other row

I need an Excel macro that does the following:

Sheet1

A            B              C               D            E               F                 G             H
appleA   appleA     appleA       appleA
TITLE     descA       descA        descA    
appleB appleB       appleB       appleB
TITLE     descB       descB        descB  
etc.....

into this:
A            B              C               D            E               F                 G             H
appleA   appleA     appleA       appleA   descA       descA          descA      
appleB appleB       appleB       appleB   descB       descB          descB
etc....


In other words, take out the TITLE, offset the row below to be next to the previous row and delete the blank line.

Good luck... I need this right away (just in time for the weekend :)

Thanks!    
 

Answer : Need an Excel Macro to offset every other row

Sub MoveMe()
Dim MyCell As Range

For Each MyCell In Selection
    If UCase(MyCell.Value) = "TITLE" Then
        MyCell.Offset(-1, 4) = MyCell.Offset(0, 1)
        MyCell.Offset(-1, 5) = MyCell.Offset(0, 2)
        MyCell.Offset(-1, 6) = MyCell.Offset(0, 3)
        MyCell.EntireRow.Delete
    End If
Next
End Sub
Random Solutions  
 
programming4us programming4us