Hey people,
code segment will explain itself, everything works fine except method of range fails when trying to merge 2 adjacent cells.
fairly new to coding so bare with me
With QuotePreviewSheet.Range("D1000").End(xlUp).Offset(3, 0)
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
.Font.Bold = False
.Font.name = "Lao UI"
.Font.Size = 10
.WrapText = True
'Adds in the scope name and formats
.Offset(-1, -1).Value = sh.name
.Offset(-1, -1).Font.Bold = True
.Offset(-1, -1).Font.Size = 12
.Offset(-1, -1).Font.name = "Lao UI"
.Range((.Offset(-1, -1)), Range((.Offset(-1, 0)))).Merge <-------- error line
'.WrapText = True
'Adds in the scope $$ and formats
.Offset(-1, 3).Value = sh.Range("F2").Value
.Offset(-1, 3).Font.Bold = True
.Offset(-1, 3).Font.Size = 12
.Offset(-1, 3).Font.name = "Lao UI"
'.WrapText = True
End With
is there a work around for selecting these 2 cells as it goes down the list each time to merge them??
code segment will explain itself, everything works fine except method of range fails when trying to merge 2 adjacent cells.
fairly new to coding so bare with me
With QuotePreviewSheet.Range("D1000").End(xlUp).Offset(3, 0)
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
.Font.Bold = False
.Font.name = "Lao UI"
.Font.Size = 10
.WrapText = True
'Adds in the scope name and formats
.Offset(-1, -1).Value = sh.name
.Offset(-1, -1).Font.Bold = True
.Offset(-1, -1).Font.Size = 12
.Offset(-1, -1).Font.name = "Lao UI"
.Range((.Offset(-1, -1)), Range((.Offset(-1, 0)))).Merge <-------- error line
'.WrapText = True
'Adds in the scope $$ and formats
.Offset(-1, 3).Value = sh.Range("F2").Value
.Offset(-1, 3).Font.Bold = True
.Offset(-1, 3).Font.Size = 12
.Offset(-1, 3).Font.name = "Lao UI"
'.WrapText = True
End With
is there a work around for selecting these 2 cells as it goes down the list each time to merge them??