doriannjeshi
Active Member
- Joined
- Apr 5, 2015
- Messages
- 301
- Office Version
- 365
- Platform
- Windows
Hi,
I have this macro that merges column B cells, if column A cells are the same
Is possible to 1)change the range to be until the end of data in column A (not set like this Range("A2:A111150")
2)The merging to not include row 1 , as right now it merges the header too
Dim cellsA As Range
Dim i As Long
i = 1
For Each cellsA In ActiveSheet.Range("A2:A111150") 'expand range to your needs
If cellsA.Value <> cellsA.Offset(1, 0).Value Then
Range("B" & i & ":B" & cellsA.Row).Merge
i = cellsA.Row + 1
I have this macro that merges column B cells, if column A cells are the same
Is possible to 1)change the range to be until the end of data in column A (not set like this Range("A2:A111150")
2)The merging to not include row 1 , as right now it merges the header too
Dim cellsA As Range
Dim i As Long
i = 1
For Each cellsA In ActiveSheet.Range("A2:A111150") 'expand range to your needs
If cellsA.Value <> cellsA.Offset(1, 0).Value Then
Range("B" & i & ":B" & cellsA.Row).Merge
i = cellsA.Row + 1