S
SteveM
I want to take a group of cells and merge them. I know they will always be
columns B through F, but the row number will vary. I saved the row number
in a variable (rownum), but can't figure out how to then select those cells
to merge. I have this, but it doesn't work. I would appreciate any help you
can give me. Thanks in advance,
Dim SelRange As Range
Set SelRange = ActiveSheet.ActiveCell.Range(Cells(rownum, 2),
Cells(rownnum, 6))
Range(SelRange).Select
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
columns B through F, but the row number will vary. I saved the row number
in a variable (rownum), but can't figure out how to then select those cells
to merge. I have this, but it doesn't work. I would appreciate any help you
can give me. Thanks in advance,
Dim SelRange As Range
Set SelRange = ActiveSheet.ActiveCell.Range(Cells(rownum, 2),
Cells(rownnum, 6))
Range(SelRange).Select
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With