Solved merge cells subject to specific info

December 1, 2013 at 05:21:22
Specs: Windows 7
Sheets(shtname).Range(Cells(5, colNum + 1), Cells(5, colNum + 2)).Merge

Can any one enlighten me as to what I have wrong with the above bit of code
What I am trying to do is merge to cells on a specific sheet, 5 rows from the top of the sheet, in relation to a specified column number whose value is generated from another cell

so if the colNum = 11, then what I require is to merge cells L5:M5
I am coming up with a runtime error

message edited by tonygibb

See More: merge cells subject to specific info

Report •

December 1, 2013 at 07:00:01
✔ Best Answer
With Sheets(shtname)
    .Range(.Cells(5, colNum + 1), .Cells(5, colNum + 2)).Merge
End With

I have my answer guys, this is Ronseal all over

Report •
Related Solutions

Ask Question