excel合拢单元格 得到所有数据

excel合并单元格 得到所有数据excel合并单元格如何得到所有数据?并显示在原来的单元格中, 默认的 合并单元

excel合并单元格 得到所有数据
excel合并单元格如何得到所有数据?并显示在原来的单元格中, 默认的 合并单元格只保留最左边的数据。
[解决办法]
用VBA吧


Sub MergeRanges()
    Dim rng As Range, txt As String
    For Each rng In Selection
        txt = txt & rng.Value2
    Next
    Application.DisplayAlerts = False
    Selection.Merge
    Selection = txt
    Application.DisplayAlerts = True
End Sub