vba - Merging text from multiple cells into one cell -
i new vba , trying solve little problem @ work. how can re-create string some cells one merged cell?
lets have 5 cells string in them:
one 2 3 4 5
i need take them , create cell these words one under other
like this:
sub test() dim mergedstr string dim afterfirst boolean each cell in range("a1:a5") if afterfirst mergedstr = mergedstr & chr(10) mergedstr = mergedstr & cell.value afterfirst = true next cell range("d3").value = mergedstr end sub
vba excel-vba merge
No comments:
Post a Comment