[阅读: 367] 2008-10-10 03:22:06
一直以为要分2级:合并过的大格子,大格子包含的基本格子
原来它的Selection.Cells是不分是不是合并过的
Sub cai2()
For Each vcell In Selection.Cells
vcell.UnMerge
Next vcell
s = ""
For Each vcell In Selection.Cells
If vcell.FormulaR1C1 = "" Then
vcell.FormulaR1C1 = s
Else
s = vcell.FormulaR1C1
End If
Next vcell
End Sub