Merge Multiple Blank Ranges

Starting with a blank sheet, I want to merge groups of 7 cells as follows ....
A1:A7
A7:A14
A15:A21
A22:A28
Etc. down to approximately row 1500

Doing it manually is a pain.
Is there any way of automating it?
LVL 24
EirmanChief Operations ManagerAsked:
Who is Participating?
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.

Saurabh Singh TeotiaCommented:
You can run a macro to do what you are looking for..

Sub mergecell()
    Dim i As Long
    For i = 1 To 1500 Step 7
        Range("A" & i & ":A" & i + 6).Merge
    Next i
End Sub

Open in new window


Enclosed is the workbook post macro has run..

Saurabh...
Book2.xlsm
0
helpfinderIT ConsultantCommented:
how exactly to merge? do you have text in cells or numbers? could you provide example?

you can use "&" sigh to merge cells, e.g. if you have cities in the cells you can merge them as =A1&A2&A3
if you want with space then =A1&" "&A2&" "&A3
sample.xlsx
0
Saqib Husain, SyedEngineerCommented:
You do not need any VBA

Merge A1:A7
Select the merged range A1:A7
Drag the tiny square at the bottom right of the selection as far down as needed
0

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
EirmanChief Operations ManagerAuthor Commented:
Saqib Husain, Syed, I often use that method with dates etc but I didn't know it could be used that way. Thanks

Thanks for the alternative suggestions Saurabh Singh Teotia & helpfinder
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.