Dear Gaetan, Please see attached sheet if it help to u... ** *Sub Remove_Duplcate_and_Merge() **Dim i, j As Integer Application.ScreenUpdating = False Application.DisplayAlerts = False For i = 1 To Sheet1.UsedRange.Rows.Count If Sheet1.Cells(i, 1).Value = Sheet1.Cells(i, 2).Value Then Sheet1.Range("A" & i & ":" & "B" & i).Merge Sheet1.Range("A" & i & ":" & "B" & i).Select Selection.HorizontalAlignment = xlCenter End If Next i Application.ScreenUpdating = True Application.DisplayAlerts = True **End Sub *
-- Thanks & regards, Noorain Ansari *http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/> On Wed, Aug 31, 2011 at 2:44 AM, Gaetan M <gaetan.me...@wanadoo.fr> wrote: > I have the following: > > Column A B C D > E F > 12722 12722 51.5 64.89 RNLO X > 12723 12723 51.5 64.89 RNLO X > > Would you have the solution to replace B1 by B2 and delete row 2 once > completed since they have been merge? > > Thanks, > > G. > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel
Remove_Duplicate_Merge.xlsm
Description: Binary data