Hi,
I need some code that would merge cells in column C where the values in column B are the same
Any help is greatly appreciated
Kevin
Hi,
I need some code that would merge cells in column C where the values in column B are the same
Any help is greatly appreciated
Kevin
as this no doubt is part of a greater application, will you be using formula or VBA/macros on the final range.
if so please reconsider the use of merged cells - they can and do present cell referencing problems when data handling.
I know they make a sheet look 'pretty' but sacrifice 'looks' so that Excel can perform logically.
Torachan,
Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.
The final range will not have formula or VBA.
Thanks
According to your attachment a VBA demonstration as a beginner starter :
PHP Code:
Sub Demo1()
Dim Rg(1) As Range
With Range("B4", [B4].End(xlDown))
Set Rg(0) = .Cells(1)
Do
Set Rg(1) = .Find(Rg(0), , , 1, , 2)
If Rg(1).Row > Rg(0).Row Then Range(Rg(0), Rg(1)).Offset(, 1).Merge
Set Rg(0) = Rg(1)(2)
Loop Until IsEmpty(Rg(0))
End With
Erase Rg
End Sub
► Do you like it ? ► ► So thanks to click on bottom left star icon ? ★ Add Reputation ? ! ◄ ◄
Thank you Marc, it works great
Kevin
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks