-Hi Team Please assist in merging Duplicate cells -Column B and A . Column b -contains names in -ascending order. and -Column A Contains count of duplicate value from columnnB Attached are my workbook.& expected result In column EF Thanks mg
-Hi Team Please assist in merging Duplicate cells -Column B and A . Column b -contains names in -ascending order. and -Column A Contains count of duplicate value from columnnB Attached are my workbook.& expected result In column EF Thanks mg
Sub MergeCells2() Dim ws As Worksheet Dim lRow As Long Dim i As Long Set ws = Sheet1 lRow = ws.Cells(Rows.Count, "A").End(xlUp).Row Application.DisplayAlerts = False For i = lRow To 3 Step -1 If ws.Cells(i, 2) = ws.Cells(i - 1, 2) Then ws.Cells(i - 1, 1).Resize(2).Merge ws.Cells(i - 1, 2).Resize(2).Merge End If Next i Application.DisplayAlerts = True End Sub
Hi Mana,
Superb !!! It worked as expected, you covered both column merging in a single loop thats awesome
Thanks a lot
regards,
mg