Delete column without deleting merged cells - excel vba -
how can delete left-most column of merged cell without deleting content?
for instance, range("a1:c1") merged .value="hi"
by doing range("a2").entirecolumn.delete(xlleft), not lose merged cell (which becomes range("a1:b1"), lose content.
why not hold value in temp variable:
sub deletecolumnretainmergedcellvalue() 'select merged cells, run subroutine. dim v string v = selection.cells(1, 1).value selection.cells(1, 1).entirecolumn.delete selection.cells(1, 1).value = v end sub is you're looking for? if not, please explain little more.
Comments
Post a Comment