Merge cells doesn't work after locking and unlocking other cell
问题 I've got a sheet in which I'm trying to merge some cells based on CX cell value. CX cell is also dynamically locked/unlocked based on BX cell value. Although locking/unlocking works fine, I get 1004 error when I'm trying to merge cells with line: Range(Cells(Target.Row, i), Cells(Target.Row + Target.Value - 1, i)).Merge While code is below. Option Explicit Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) If Not Intersect(Target, Range("B14:B50")) Is Nothing And Sh