Merge Cells Over A Range Using For Each Loop

Merge Cells Over A Range Using For Each Loop


Sub Merge_Cells_Over_A_Range()

    ThisWorkbook.Activate

    shtDashboard.Activate

    Dim rng As Range, r As Range

    Set rng = Range("B13:B153")

    For Each r In rng

        r.Resize(1, 3).Merge

    Next r

End Sub


Comments

Popular posts from this blog

Power Automate - Automatically fetch data from Power BI in to Excel and Send the copy of the Excel file via Email

VBA Outlook - Convert Early Binding to Late Binding

Split Numbers into Whole part and Decimal part without using the Round() Function