I would like to merge two cells as one and I have to do that for 2000+ rows (1000+) if merged. I am looking for a macro that will help with this. Below is an example of what I would like to do..
I have used the basic macro recorder and its a lot of cells that I have hard code, I have 2003 rows that I need to do the below too.
Sub Macro2()
'
' Macro2 Macro
'
'
Range("A28:A29,C28:C29,E28:E29,F28:F29").Select
Range("F28").Activate
With Selection
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
Range("A1").Select
End Sub
Below is an example of the data that I want to merge... https://i.sstatic.net/US0MG.jpg
Number Def Name1 Name2 Group1 Group2
12345 1 abcd 1 2
12345 2 abcd 1 2
123456 1 abcde 5 8
123456 2 abcde 5 8
123789 1 qwert 2 5
123789 2 qwert 2 5
After merging , I would like to see the below: https://i.sstatic.net/Pz0tb.jpg
Number Def Name1 Name2 Group1 Group2
12345 1 abcd 1 2
2
123456 1 abcde 5 8
2
123789 1 qwert 2 5
2
Thanks for your help in this matter!
Regards, Samit