Help with positioning in an Excel Macro

I need to expand the merged cells (currently 2) by one cell to the right in about 100 cells.
When I record the following macro, it works, but every time I run the macro it wants to expand and left justify the same cell.
I tried deleting the line,   Range("F1:H1").Select, but then the macro does not work.  
How to I get the macro to ignore the original recorded starting point and just begin a the position where the cursor is when I run the macro?

Sub EC()
'
' EC Macro
' Macro recorded 6/30/2015 by user
'
' Keyboard Shortcut: Ctrl+e
'
    Range("F1:H1").Select
    With Selection
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
    End With
    With Selection
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With
    Selection.UnMerge
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Merge
    With Selection
        .HorizontalAlignment = xlLeft
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = True
    End With
    Range("F2:G2").Select
End Sub
LVL 1
Bill GoldenExecutive Managing MemberAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ProfessorJimJamMicrosoft Excel ExpertCommented:
Turn on the "Relative Reference " when recording macro then the recorded code should work

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kanti PrasadCommented:
Hi

To your code above delete  Range("F1:H1").Select and add the below on top

Dim Bottom As Long
Dim i As Integer
Bottom = Cells(Rows.Count, "F").End(xlUp).Row
Let Copyrange = "F" & i & ":" & "H" & i
For i = 1 To Bottom
Range(Cells(i, 6), Cells(i, 8)).Select


at the bottom delete   Range("F2:G2").Select and add
Next i
Kanti PrasadCommented:
Hi

If you want to suppress the msg box then in the 2nd With Selection add
Application.DisplayAlerts = False
End With

 With Selection
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        'Application.DisplayAlerts = False
        .MergeCells = True
        Application.DisplayAlerts = False
    End With
Bill GoldenExecutive Managing MemberAuthor Commented:
Marvelous...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.